projects
/
oweals
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b37d41a
)
checkpatch: add check for whitespace before semicolon at end-of-line
author
Eric Nelson
<eric.nelson@boundarydevices.com>
Thu, 3 May 2012 03:32:18 +0000
(20:32 -0700)
committer
Wolfgang Denk
<wd@denx.de>
Thu, 21 Jun 2012 19:30:02 +0000
(21:30 +0200)
This tests for a bad habits of mine like this:
return 0 ;
Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
tools/checkpatch.pl
patch
|
blob
|
history
diff --git
a/tools/checkpatch.pl
b/tools/checkpatch.pl
index 2048a449b51c7b24c4e9cea031b1eab21f817c81..c7475f9e3361d2a01e08b69c1588ee69ddb69bc8 100755
(executable)
--- a/
tools/checkpatch.pl
+++ b/
tools/checkpatch.pl
@@
-3139,6
+3139,12
@@
sub process {
"Statements terminations use 1 semicolon\n" . $herecurr);
}
+# check for whitespace before semicolon - not allowed at end-of-line
+ if ($line =~ /\s+;$/) {
+ WARN("SPACEBEFORE_SEMICOLON",
+ "Whitespace before semicolon\n" . $herecurr);
+ }
+
# check for gcc specific __FUNCTION__
if ($line =~ /__FUNCTION__/) {
WARN("USE_FUNC",