mix kogen.diff_check (KogenCredo v0.1.0)
View SourceJudges each function changed in a git range against its own base version.
mix kogen.diff_check origin/main...HEAD
mix kogen.diff_check v1.0..HEAD --path lib/ --format githubA...B compares B with the merge base of A and B; A..B compares the two commits
directly. The task only reads git objects (rev-parse, merge-base, diff --name-status,
cat-file): it creates no commits, installs no hooks and writes nothing.
Options
--repo PATH- repository directory (default.)--path P- path relative to--repo, repeatable (defaultlib/); a path matching no file in either tree is an error (exit 2)--format text|json|github- output (defaulttext);githubprints escaped::warning/::errorannotations--rules a,b- only these rule ids (default all)--error-rules a,b- promote these rules from advisory to error--fail-on advisory|error|none- which findings give exit 1 (defaulterror)--sensitive-field F- query scope field forquery-lost-scope, repeatable--cast-sensitive-field F- fieldchangeset-weakenedflags when added tocast--repo-name Name- last alias segment that denotes a repo, repeatable (defaultRepo)
Rule ids: query-lost-limit, query-lost-scope, new-repo-in-loop, new-silent-fallback,
changeset-weakened, lost-transaction, widened-api. Every rule is advisory by default;
see KogenCredo.Diff for what is and is not measured.
Exit codes
0 nothing at or above --fail-on; 1 such findings; 2 usage error, git failure, or a
file whose source could not be parsed (never reported as success). Needs only Elixir and git;
the project does not have to compile.