mirror of
https://github.com/Mbed-TLS/mbedtls-framework.git
synced 2026-10-01 22:37:23 +00:00
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 <[email protected]>
This commit is contained in:
@@ -310,7 +310,7 @@ class TrailingWhitespaceIssueTracker(LineIssueTracker):
|
|||||||
"""Track lines with trailing whitespace."""
|
"""Track lines with trailing whitespace."""
|
||||||
|
|
||||||
heading = "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):
|
def issue_with_line(self, line, _filepath, _line_number):
|
||||||
return line.rstrip(b"\r\n") != line.rstrip()
|
return line.rstrip(b"\r\n") != line.rstrip()
|
||||||
|
|||||||
Reference in New Issue
Block a user