commit c8fae6b5c8c76089da37c169defbc63a53300a3f
parent 9feeb4cf97d98c7b8cf3c7e871b239cea835f3f4
Author: Nick Mathewson <nickm@torproject.org>
Date: Fri, 10 Jan 2020 09:25:04 -0500
checkSpace: don't treat an unindented label as starting a function.
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/maint/checkSpace.pl b/scripts/maint/checkSpace.pl
@@ -207,7 +207,7 @@ for my $fn (@ARGV) {
if ($in_func_head ||
($fn !~ /\.h$/ && /^[a-zA-Z0-9_]/ &&
! /^(?:const |static )*(?:typedef|struct|union)[^\(]*$/ &&
- ! /= *\{$/ && ! /;$/)) {
+ ! /= *\{$/ && ! /;$/) && ! /^[a-zA-Z0-9_]+\s*:/) {
if (/.\{$/){
msg "fn() {:$fn:$.\n";
$in_func_head = 0;