mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2025-02-20 13:34:51 +01:00
Patch from karsten to detect unnecessary \n's.
Also fix a spacing issue.
This commit is contained in:
parent
245be159af
commit
21f91dcb50
1 changed files with 8 additions and 4 deletions
|
@ -28,11 +28,15 @@ for $fn (@ARGV) {
|
|||
if ($C && /\s(?:if|while|for|switch)\(/) {
|
||||
print " KW(:$fn:$.\n";
|
||||
}
|
||||
## Warn about #else #if instead of #elif.
|
||||
if (($lastline =~ /^\# *else/) and ($_ =~ /^\# *if/)) {
|
||||
## Warn about #else #if instead of #elif.
|
||||
if (($lastline =~ /^\# *else/) and ($_ =~ /^\# *if/)) {
|
||||
print " #else#if:$fn:$.\n";
|
||||
}
|
||||
$lastline = $_;
|
||||
}
|
||||
$lastline = $_;
|
||||
## Warn about unnecessary empty lines.
|
||||
if ($lastnil && /^\s*}\n/) {
|
||||
print " UnnecNL:$fn:$.\n";
|
||||
}
|
||||
## Warn about multiple empty lines.
|
||||
if ($lastnil && /^$/) {
|
||||
print " DoubleNL:$fn:$.\n";
|
||||
|
|
Loading…
Add table
Reference in a new issue