View Source elvis_git (elvis v3.2.6)

Summary

Functions

Install a pre commit hook for the git repository in the current dir.

Takes a git patch and an absolute file line number and returns a relative position for that line in the patch.

Functions

-spec branch_files(string()) -> [elvis_file:file()].
-spec install_hook() -> ok.

Install a pre commit hook for the git repository in the current dir.

Link to this function

relative_position(Patch, LineNum)

View Source
-spec relative_position(binary(), integer()) -> {ok, integer()} | not_found.

Takes a git patch and an absolute file line number and returns a relative position for that line in the patch.

Link to this function

run_branch(Commit, Config)

View Source
-spec run_branch(string(), elvis_config:configs()) -> ok.
-spec run_hook(elvis_config:configs()) -> ok.
-spec staged_files() -> [elvis_file:file()].