From 581da21d7b240ec037be1da1849e54f1681ca70c Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Fri, 12 Sep 2025 21:59:31 +0200 Subject: [PATCH] Allow patch files to have trailing whitespace An unchanged blank line results in a line containing a single space in the diff. Signed-off-by: Gilles Peskine --- scripts/check_files.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/check_files.py b/scripts/check_files.py index d3a61c1d6..3db3dcb2f 100755 --- a/scripts/check_files.py +++ b/scripts/check_files.py @@ -310,7 +310,7 @@ class TrailingWhitespaceIssueTracker(LineIssueTracker): """Track lines with trailing whitespace.""" heading = "Trailing whitespace:" - suffix_exemptions = frozenset([".dsp", ".md"]) + suffix_exemptions = frozenset([".diff", ".dsp", ".md", ".patch"]) def issue_with_line(self, line, _filepath, _line_number): return line.rstrip(b"\r\n") != line.rstrip()