Commit 9e3e0367 authored by Hugh Davenport's avatar Hugh Davenport Committed by Gerrit Code Review
Browse files

Merge changes Ia5066f79,I747af286

* changes:
  Add a minaccept test for missing space in "){"
  Fix minaccept test for opening bracket following an if statement
parents 0f1879c3 11923c5c
......@@ -57,13 +57,17 @@ while (<>) {
if (/\}\s*(else|catch)/) {
bad_line("cuddled elses/catches are against Mahara coding guidelines", $_);
}
if (/elseif/) {
if (/\belseif\b/) {
bad_line("a single space is requred between an else and an if on the same line", $_);
}
if (/(if|while|for)\(/ || /(if|while|for)\s\s+\(/) {
if (/\b(if|while|for)\(/ || /\b(if|while|for)\s\s+\(/) {
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