Expand description
Diff line filters shared by every surface that accepts a unified diff.
The CLI (--diff-file, --diff-stdin and the CI diff) and the programmatic
API (analysis.diffFile) narrow a report to the lines a change added. Both
call the functions in this module, so a finding cannot pass the filter on
one surface and fail it on another.
Functionsยง
- filter_
dead_ code_ by_ diff - Drop the dead-code findings whose source line is not on an added line of the diff.
- filter_
duplication_ by_ diff - Keep only the clone groups with at least one instance whose line range overlaps an added line of the diff.