Expand description
Diff-aware analysis for PR workflows
This module provides functionality to filter findings to only those affecting lines changed in a PR/diff. This is useful for:
- PR workflows where you only want to see new issues
- Incremental analysis to reduce noise
- CI pipelines that focus on changed code
Functions§
- filter_
findings_ by_ diff - Filter findings to only include those on changed lines
- get_
changed_ lines_ from_ git - Get changed lines by running
git diffagainst a base reference - get_
changed_ lines_ from_ stdin - Get changed lines from unified diff text read from stdin
- is_
file_ changed - Check if a file is in the changed files set (regardless of line numbers)
- parse_
unified_ diff - Parse a unified diff and extract the changed line numbers for each file
Type Aliases§
- Changed
Lines - Map of file paths to the set of line numbers that were changed