From: Joe Perches Date: Fri, 5 Mar 2010 21:43:55 +0000 (-0800) Subject: checkpatch: warn on unnecessary spaces before quoted newlines X-Git-Tag: v3.0~5731 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5e79d96eed306a8b4af67b3f35f6867edfabeebc;p=platform%2Fkernel%2Flinux-amlogic.git checkpatch: warn on unnecessary spaces before quoted newlines Signed-off-by: Joe Perches Cc: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index cf4e44c..a4d7434 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -1394,6 +1394,11 @@ sub process { WARN("line over 80 characters\n" . $herecurr); } +# check for spaces before a quoted newline + if ($rawline =~ /^.*\".*\s\\n/) { + WARN("unnecessary whitespace before a quoted newline\n" . $herecurr); + } + # check for adding lines without a newline. if ($line =~ /^\+/ && defined $lines[$linenr] && $lines[$linenr] =~ /^\\ No newline at end of file/) { WARN("adding a line without newline at end of file\n" . $herecurr);