style: relax the else's body check
* tests/sanity/style.test: Skip the "else body should be on next line" check when else is followed by if.
This commit is contained in:
parent
bcfcea6272
commit
31462d84ba
1 changed files with 1 additions and 1 deletions
|
|
@ -160,7 +160,7 @@ for dir in "$TOP/spot" "$TOP/bin" "$TOP/tests"; do
|
|||
$GREP '[ ]if ([^()]*([^()]*)[^()]*).*;' $tmp &&
|
||||
diag 'if body should be on another line.'
|
||||
|
||||
$GREP -E '[ ]else.*;(|.*}.*)$' $tmp &&
|
||||
$GREP -E '[ ]else [^i][^f].*;(|.*}.*)$' $tmp &&
|
||||
diag 'else body should be on another line.'
|
||||
|
||||
$GREP '[ ]while(' $tmp &&
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue