Revert "extras: reverse test for '}' vs. following 'else' placement"
This reverts commit 0a8371bdfd
.
Change-Id: I946f449ad213cea70fbbd9cd3951f5838b9f82e5
BUG: 1120646
Signed-off-by: Harshavardhana <harsha@harshavardhana.net>
Reviewed-on: http://review.gluster.org/8927
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Reviewed-by: Niels de Vos <ndevos@redhat.com>
Tested-by: Niels de Vos <ndevos@redhat.com>
This commit is contained in:
parent
3b5b5042ec
commit
7808d4b789
@ -3335,12 +3335,12 @@ sub process {
|
||||
"trailing statements should be on next line\n" . $herecurr);
|
||||
}
|
||||
|
||||
# Check for "} else" which is less readable. Having if/else keywords
|
||||
# line up is a good thing, and having control structures on the same
|
||||
# line as a close-brace is bad.
|
||||
if ($line=~/^.\s*}\selse\s*/) {
|
||||
# Check for }<nl>else {, these must be at the same
|
||||
# indent level to be relevant to each other.
|
||||
if ($prevline=~/}\s*$/ and $line=~/^.\s*else\s*/ and
|
||||
$previndent == $indent) {
|
||||
ERROR("ELSE_AFTER_BRACE",
|
||||
"'}' and 'else' should be on separate lines\n" . $hereprev);
|
||||
"else should follow close brace '}'\n" . $hereprev);
|
||||
}
|
||||
|
||||
if ($prevline=~/}\s*$/ and $line=~/^.\s*while\s*/ and
|
||||
|
Loading…
Reference in New Issue
Block a user