summaryrefslogtreecommitdiff
path: root/plugins/security-guidance/tests/test_diff_parsing.py
AgeCommit message (Collapse)Author
2026-10-12security-guidance: count diff headers the parser could not readmhegazy/sg-diff-parsingMohamed Hegazy
A file whose header cannot be parsed is left out of the review without a trace. The Stop hook now reports diff_hdr_unparsed (a count, only when nonzero) so a header shape the parser misses shows up in metrics.
2026-10-12security-guidance: parse diff sections by header lineMohamed Hegazy
The diff parser split on the text 'diff --git ' anywhere, so a file whose own content contains it was cut short, and the rest of that file was never reviewed. It also dropped files whose names git quotes (a double quote, backslash or control character in the name). Split only where a line starts with the header, and decode quoted names.