clang-format always indent labels by default and that can't be changed
with any configuration option. Also, indented labels tend to improve
code readability, especially in long functions.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
}
}
-#goto labels aren't indented, allow a single space however
- if ($line=~/^.\s+[A-Za-z\d_]+:(?![0-9]+)/ and
- !($line=~/^. [A-Za-z\d_]+:/) and !($line=~/^.\s+default:/)) {
- if (WARN("INDENTED_LABEL",
- "labels should not be indented\n" . $herecurr) &&
- $fix) {
- $fixed[$fixlinenr] =~
- s/^(.)\s+/$1/;
- }
- }
-
# return is not a function
if (defined($stat) && $stat =~ /^.\s*return(\s*)\(/s) {
my $spacing = $1;