Expand description
Stable per-finding keys and audit ledgers that compare head results against a base snapshot, plus helpers that annotate output JSON with introduced-vs-pre-existing attribution.
Structs§
- Audit
Comparison - One-pass audit comparison shared by attribution, verdict, and annotations.
- Audit
Domain Ledger - Stable-key membership for one non-dead-code audit domain.
- Audit
Finding Record - One dead-code finding classified for audit comparison.
- Changed
Paths - The files of a change, as root-relative paths in the form of the identity keys.
- Complexity
Class - Attribution of one head complexity finding against the base findings.
- Complexity
Metrics - Metric values of one base complexity finding.
- Dead
Code Audit Ledger - Exhaustive dead-code comparison ledger shared by audit verdict and output.
Functions§
- annotate_
dead_ code_ json - Insert
"introduced": boolinto every dead-code finding object in the serialized JSON by re-deriving each key and testing membership against the base snapshot. JSON arrays must be in the same order as the typedresultscollections they were serialized from. - annotate_
domain_ demotions_ json - Attach a
demotion_reasonto demoted entries of an audit JSON array, matching entries to demoted membership by array position. Non-demoted entries are left untouched so output without demotions stays byte-identical (issue #2220). - annotate_
domain_ json - Attach precomputed introduced membership to an audit JSON array.
- annotate_
dupes_ json - Insert
"introduced": boolinto eachclone_groupsobject in serialized duplication JSON, matching groups to the typed report by array position. - annotate_
health_ json - Insert
"introduced": boolinto eachfindingsandstyling_findingsobject in serialized health JSON, matching entries to the typed report by array position. - annotate_
stale_ suppressions_ json - Annotate the sole legacy dead-code collection without a typed
introducedfield. Every wrapper-backed collection is annotated from the persistedAuditComparisoninstead. - classify_
complexity_ attribution - Classify each head complexity finding against one base, in report order.
- classify_
complexity_ attribution_ against_ all - Classify each head complexity finding against several bases, in report order.
- classify_
complexity_ attribution_ against_ all_ with_ moves - Classify each head complexity finding against several bases, as
classify_complexity_attribution_against_alldoes, and match the functions that the change moved to another file against each base (seeclassify_complexity_attribution_with_moves). - classify_
complexity_ attribution_ with_ moves - Classify each head complexity finding against one base, as
classify_complexity_attributiondoes, and then match the functions that the change moved to another file. - classify_
complexity_ findings - Classify each head complexity finding as introduced (
true) or inherited (false), in report order. Seeclassify_complexity_attribution. - classify_
complexity_ findings_ against_ all - Classify each head complexity finding against several bases, in report order. A finding is introduced only when it is introduced against every base, so a finding that one base already has is inherited.
- collection_
keys - The audit keys of one finding collection, in collection order.
- complexity_
baseline - The base complexity findings of a health report, by identity key.
- complexity_
baseline_ keys - The identity keys of a complexity baseline.
- complexity_
ledger_ keys - The ledger key of each complexity finding, in report order.
- dead_
code_ audit_ ledger - Build the exhaustive dead-code comparison ledger once for an audit run.
- dead_
code_ keys - Build the set of audit attribution keys for all dead-code findings in
results. - dupe_
group_ key - Attribution key for one clone group:
dupe:<sorted files joined by |>:<tokens>:<lines>:<fragment hash>. The fragment hash keeps distinct groups spanning the same files apart; line positions are excluded so a group survives shifts within its files. The fragment hash leaves out\r, so the line endings do not change the key. It does not depend on the order of the instances, so a group keeps its hash when the change moves its instances to other files. - dupes_
keys - Attribution key set for every clone group in a duplication report.
- health_
finding_ key - Identity key for one complexity finding:
complexity:<path>:<function>. - health_
keys - Attribution key set for every complexity finding in a health report.
- relative_
key_ path - Canonical path form used inside attribution keys. The engine owns the one
implementation, because its module-graph maps use the same keys.
Canonical path form used inside audit attribution keys: root-relative with
forward slashes on every platform. Paths outside
rootkeep their simplified absolute form so keys stay unique. - remap_
complexity_ baseline_ for_ renames - Relocate the base findings of renamed files onto their head paths.
- remap_
keys_ for_ renames - Remap root-relative path tokens inside base-snapshot attribution keys so a finding on a renamed file matches its base counterpart under the old path.
- retain_
introduced_ dead_ code - Retain only findings whose audit key was NOT present in
base(i.e. was introduced on the current branch). - set_
stale_ suppression_ audit_ attribution - Set the audit attribution on the stale-suppression issues of the dead-code CodeClimate issues.
- stale_
suppression_ introduced_ flags - The audit flag of each stale suppression, in report order. A flag is
truewhen the base snapshot does not hold the key of the suppression. - styling_
finding_ key - Identity key for one styling finding:
styling:<code>:<sub kind>:<path>:<value>, plus:<selector hash>when the finding has the selector of its rule. - styling_
keys - Attribution key set for every styling finding in a health report.
- styling_
ledger_ keys - Attribution keys of styling findings, in the order of
findings. - styling_
ledger_ keys_ with_ diff - Attribution keys of styling findings, like
styling_ledger_keys.
Type Aliases§
- Complexity
Baseline - Base complexity findings by identity key (
complexity:<path>:<function>), each list sorted by line.