From ae9c09850a173f32f56321e7fd2dc334d570b727 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Tue, 6 Jun 2017 08:39:34 -0700 Subject: [PATCH] checkpatch: Also allow .at files to have leading tabs. Autotest .at files often have lines with samples of expected output from various programs, which fairly often includes leading tabs, so this warning causes false positives there. Signed-off-by: Ben Pfaff Reviewed-by: Aaron Conole --- utilities/checkpatch.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/utilities/checkpatch.py b/utilities/checkpatch.py index 5ca4b9e2f..df926e437 100755 --- a/utilities/checkpatch.py +++ b/utilities/checkpatch.py @@ -99,6 +99,11 @@ skip_signoff_check = False line_length_blacklist = ['.am', '.at', 'etc', '.in', '.m4', '.mk', '.patch', '.py'] +# Don't enforce a requirement that leading whitespace be all spaces on +# files that include these characters in their name, since these kinds +# of files need lines with leading tabs. +leading_whitespace_blacklist = ['.mk', '.am', '.at'] + def is_subtracted_line(line): """Returns TRUE if the line in question has been removed.""" @@ -200,8 +205,9 @@ checks = [ 'check': lambda x: line_length_check(x), 'print': lambda: print_warning("Line length is >79-characters long")}, - {'regex': '$(?