mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-24 12:23:32 +01:00
correct multiple internal spaces
svn:r3004
This commit is contained in:
parent
6f5dbefa7e
commit
f7c6ad065e
@ -40,13 +40,13 @@ for $fn (@ARGV) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (m!/\*.*?\*/!) {
|
if (m!/\*.*?\*/!) {
|
||||||
s!/\*.*?\*/!!;
|
s!\s*/\*.*?\*/!!;
|
||||||
} elsif (m!/\*!) {
|
} elsif (m!/\*!) {
|
||||||
s!/\*!!;
|
s!\s*/\*!!;
|
||||||
$incomment = 1;
|
$incomment = 1;
|
||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
s!"(?:[^\"]+|\\.)*"!!g;
|
s!"(?:[^\"]+|\\.)*"!"X"!g;
|
||||||
next if /^\#/;
|
next if /^\#/;
|
||||||
## Warn about C++-style comments.
|
## Warn about C++-style comments.
|
||||||
if (m!//!) {
|
if (m!//!) {
|
||||||
@ -57,6 +57,15 @@ for $fn (@ARGV) {
|
|||||||
if (/([^\s])\{/) {
|
if (/([^\s])\{/) {
|
||||||
print " $1\{:$fn:$.\n";
|
print " $1\{:$fn:$.\n";
|
||||||
}
|
}
|
||||||
|
## Warn about multiple internal spaces.
|
||||||
|
#if (/[^\s,:]\s{2,}[^\s\\=]/) {
|
||||||
|
# print " X X:$fn:$.\n";
|
||||||
|
#}
|
||||||
|
## Warn about { with stuff after.
|
||||||
|
#s/\s+$//;
|
||||||
|
#if (/\{[^\}\\]+$/) {
|
||||||
|
# print " {X:$fn:$.\n";
|
||||||
|
#}
|
||||||
## Warn about function calls with space before parens.
|
## Warn about function calls with space before parens.
|
||||||
if (/(\w+)\s\(/) {
|
if (/(\w+)\s\(/) {
|
||||||
if ($1 ne "if" and $1 ne "while" and $1 ne "for" and
|
if ($1 ne "if" and $1 ne "while" and $1 ne "for" and
|
||||||
@ -65,15 +74,6 @@ for $fn (@ARGV) {
|
|||||||
print " fn ():$fn:$.\n";
|
print " fn ():$fn:$.\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
## Warn about multiple internal spaces.
|
|
||||||
#if (/\S\s{2,}[^\s\\]/) {
|
|
||||||
# print " X X:$fn:$.\n";
|
|
||||||
#}
|
|
||||||
## Warn about { with stuff after.
|
|
||||||
#s/\s+$//;
|
|
||||||
#if (/\{[^\}\\]+$/) {
|
|
||||||
# print " {X:$fn:$.\n";
|
|
||||||
#}
|
|
||||||
}
|
}
|
||||||
close(F);
|
close(F);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user