Commit 11923c5c authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Add a minaccept test for missing space in "){"

The coding standard check should catch if statements with a missing
space between the condition and the next block, like "if (1){".

Change-Id: Ia5066f793aa4d6449457de988eecfd47fcd4c495
Signed-off-by: default avatarRichard Mansfield <>
parent 3f7864cb
......@@ -64,6 +64,10 @@ while (<>) {
bad_line("conditional and looping statements should have a space between keywords ".
"and the condition brackets", $_);
if (/\b(if|while|for) \(.+\)(\s{2,})?{$/) {
bad_line("if/while/for constructs should have a space between the closing parenthesis ".
"of the expression and the opening brace of the following block", $_);
if (/\)$/) {#Note no trailing semicolon
$stack = $_;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment