diff options
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/checksrc.pl | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/checksrc.pl b/lib/checksrc.pl index 5d369496a..c3e01305e 100755 --- a/lib/checksrc.pl +++ b/lib/checksrc.pl @@ -148,6 +148,11 @@ sub scanfile { if($l =~ /^(.*)\} else/) { checkwarn($line, length($1), $file, $l, "else after closing brace on same line"); } + # check for "){" + if($l =~ /^(.*)\)\{/) { + checkwarn($line, length($1)+1, $file, $l, "missing space after close paren"); + } + # check for open brace first on line but not first column # only alert if previous line ended with a close paren and wasn't a cpp # line |