aboutsummaryrefslogtreecommitdiffstats
path: root/tools/checkfiltername.pl
diff options
context:
space:
mode:
authorMichael Mann <mmann78@netscape.net>2014-11-07 22:53:41 -0500
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2014-11-08 07:23:42 +0000
commit570df7592d1f6a38b28438192536f8c4872e8437 (patch)
tree99bd201a9c9e12f5db0bb5d89f8f8ba82416418b /tools/checkfiltername.pl
parent48885cc1bcbfdf909918d0927df34fee57e13f39 (diff)
Add checkfiltername.pl to pre-commit script
Change-Id: I34d8aa7034a4aacc2a95b35a30f25356b33a51b9 Reviewed-on: https://code.wireshark.org/review/5187 Reviewed-by: Michael Mann <mmann78@netscape.net> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'tools/checkfiltername.pl')
-rwxr-xr-xtools/checkfiltername.pl9
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/checkfiltername.pl b/tools/checkfiltername.pl
index 6f8a0f2bd4..8256945910 100755
--- a/tools/checkfiltername.pl
+++ b/tools/checkfiltername.pl
@@ -104,8 +104,6 @@ my $showall = 0;
my $comment = 0;
-my $error = 0;
-
sub checkprotoabbrev {
my $abbrev = "";
my $abbrevpos;
@@ -695,7 +693,10 @@ while (<>) {
&printprevfile();
-print "\n\nTOTAL ERRORS: $totalerrorcount";
+if ($totalerrorcount > 0) {
+ print "\n\nTOTAL ERRORS: $totalerrorcount";
+}
+
if ($filecount > 1) {
print " ($errorfilecount files)\n";
@@ -742,6 +743,6 @@ if ($filecount > 1) {
print "\n";
-exit $error;
+exit (($totalerrorcount == 0) ? 0 : 1); # exit 1 if ERROR
__END__