aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2010-02-25 16:22:29 -0500
committerNick Mathewson <nickm@torproject.org>2010-02-25 16:22:29 -0500
commit2ab3389ed64827fee4e756e5a3ffc5ff579b1a05 (patch)
tree221c82d3a06aa60c1e156d972e120784d95b62a4 /contrib
parent8b93dacbcfbca7b4653f7a9b727bdc209aff1e7c (diff)
parent215930a7de3682e311badc94edc5be761b61e0c0 (diff)
downloadtor-2ab3389ed64827fee4e756e5a3ffc5ff579b1a05.tar
tor-2ab3389ed64827fee4e756e5a3ffc5ff579b1a05.tar.gz
Merge remote branch 'mikeperry/consensus-bw-weights5-merge'
Conflicts: ChangeLog
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/checkSpace.pl12
1 files changed, 8 insertions, 4 deletions
diff --git a/contrib/checkSpace.pl b/contrib/checkSpace.pl
index db061a082..b694abff6 100755
--- a/contrib/checkSpace.pl
+++ b/contrib/checkSpace.pl
@@ -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";