style: better support if statement with initializer
* tests/sanity/style.test: Here.
This commit is contained in:
parent
49b5d570e7
commit
200ee0d204
1 changed files with 1 additions and 1 deletions
|
|
@ -164,7 +164,7 @@ for dir in "$TOP/spot" "$TOP/bin" "$TOP/tests"; do
|
||||||
$GREP '[ ]if ([^()]*([^()]*)[^()]*).*;' $tmp &&
|
$GREP '[ ]if ([^()]*([^()]*)[^()]*).*;' $tmp &&
|
||||||
diag 'if body should be on another line.'
|
diag 'if body should be on another line.'
|
||||||
|
|
||||||
$GREP '[ ]else.*;' $tmp &&
|
$GREP -E '[ ]else.*;(|.*}.*)$' $tmp &&
|
||||||
diag 'else body should be on another line.'
|
diag 'else body should be on another line.'
|
||||||
|
|
||||||
$GREP '[ ]while(' $tmp &&
|
$GREP '[ ]while(' $tmp &&
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue