diff options
author | Renato Westphal <renato@opensourcerouting.org> | 2018-10-20 16:37:39 +0200 |
---|---|---|
committer | Renato Westphal <renato@opensourcerouting.org> | 2018-10-27 20:16:12 +0200 |
commit | 12d35cedf5253f72f1f0aa32ffc2cf68a250a41d (patch) | |
tree | dc421f15cf5413bcbfe5b202a2e34a2ea8ca2f42 /tools/checkpatch.pl | |
parent | debianpkg: fix lintian warn: No need to keep .la libs for packages (diff) | |
download | frr-12d35cedf5253f72f1f0aa32ffc2cf68a250a41d.tar.xz frr-12d35cedf5253f72f1f0aa32ffc2cf68a250a41d.zip |
tools: update checkpatch to allow indented labels
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>
Diffstat (limited to 'tools/checkpatch.pl')
-rwxr-xr-x | tools/checkpatch.pl | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/tools/checkpatch.pl b/tools/checkpatch.pl index 3b861e4f8..22354c1e8 100755 --- a/tools/checkpatch.pl +++ b/tools/checkpatch.pl @@ -4519,17 +4519,6 @@ sub process { } } -#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; |