summaryrefslogtreecommitdiff
path: root/lib/checksrc.pl
diff options
context:
space:
mode:
Diffstat (limited to 'lib/checksrc.pl')
-rwxr-xr-xlib/checksrc.pl7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/checksrc.pl b/lib/checksrc.pl
index c47aaf0f5..f9d076a2f 100755
--- a/lib/checksrc.pl
+++ b/lib/checksrc.pl
@@ -84,6 +84,7 @@ my %warnings = (
'TYPEDEFSTRUCT' => 'typedefed struct',
'DOBRACE' => 'A single space between do and open brace',
'BRACEWHILE' => 'A single space between open brace and while',
+ 'EXCLAMATIONSPACE' => 'Whitespace after exclamation mark in expression',
);
sub readskiplist {
@@ -725,6 +726,12 @@ sub scanfile {
"typedef'ed struct");
}
+ if($nostr =~ /(.*)! +(\w|\()/) {
+ checkwarn("EXCLAMATIONSPACE",
+ $line, length($1)+1, $file, $ol,
+ "space after exclamation mark");
+ }
+
# check for more than one consecutive space before open brace or
# question mark. Skip lines containing strings since they make it hard
# due to artificially getting multiple spaces