mix credence.corpus (credence v0.8.0)

Copy Markdown

Runs Credence.Pattern.analyze/1 over the lib/ source of the pinned popular hex packages in corpus/ (see Credence.Corpus) and reports what Credence flags — the over-firing signal.

mix credence.corpus               # summary: totals, crashes, counts by rule + package
mix credence.corpus <rule>        # every occurrence of <rule> with file:line + source
mix credence.corpus --update-snapshot   # re-pin the accepted-findings snapshot

Fetch the corpus first with mix credence.corpus.fetch (or run mix test, which auto-fetches). A crash (a rule raising on valid code) is worse than a finding and is reported separately.

The summary/<rule> modes report the raw Pattern findings. The over-firing test (test/corpus/over_firing_test.exs) instead compares the findings, resolved to <path>:<line> <rule> identities, against the committed snapshot test/corpus/accepted_findings.txt. --update-snapshot regenerates that snapshot from the current corpus — run it after reviewing the drift the test reports, to accept the new set.