equal
deleted
inserted
replaced
31 |
31 |
32 Options: |
32 Options: |
33 |
33 |
34 -warnings process warnings as well as errors |
34 -warnings process warnings as well as errors |
35 -verbose list the files associated with each error |
35 -verbose list the files associated with each error |
|
36 -ignore EXP ignore input lines which match EXP |
36 |
37 |
37 EOF |
38 EOF |
38 exit (1); |
39 exit (1); |
39 } |
40 } |
40 |
41 |
41 my $warnings = 0; |
42 my $warnings = 0; |
42 my $verbose = 0; |
43 my $verbose = 0; |
|
44 my $ignore_exp = ""; |
43 |
45 |
44 # Analyse the rest of command-line parameters |
46 # Analyse the rest of command-line parameters |
45 if (!GetOptions( |
47 if (!GetOptions( |
46 "w|warnings" => \$warnings, |
48 "w|warnings" => \$warnings, |
47 "v|verbose" => \$verbose, |
49 "v|verbose" => \$verbose, |
|
50 "ignore=s" => \$ignore_exp, |
48 )) |
51 )) |
49 { |
52 { |
50 Usage("Invalid argument"); |
53 Usage("Invalid argument"); |
51 } |
54 } |
52 |
55 |
78 $current_package = $1; |
81 $current_package = $1; |
79 $current_package =~ s/_/\//; |
82 $current_package =~ s/_/\//; |
80 next; |
83 next; |
81 } |
84 } |
82 |
85 |
|
86 next if ($ignore_exp ne "" && $line =~ /$ignore_exp/io); |
|
87 |
83 # Error: #5: cannot open source input file "lbs/epos_cposprivacynotifier.h": |
88 # Error: #5: cannot open source input file "lbs/epos_cposprivacynotifier.h": |
84 |
89 |
85 if ($line =~ /cannot open source input file (\"|")(.*)(\"|")/) |
90 if ($line =~ /cannot open source input file (\"|")(.*)(\"|")/) |
86 { |
91 { |
87 my $missing_file = $2; |
92 my $missing_file = $2; |
|
93 $missing_file =~ s/\\/\//g; # Unix file separators please |
88 my $count = $missing_files{$missing_file}; |
94 my $count = $missing_files{$missing_file}; |
89 $count = 0 if (!defined $count); |
95 $count = 0 if (!defined $count); |
90 $missing_files{$missing_file} = $count + 1; |
96 $missing_files{$missing_file} = $count + 1; |
91 |
97 |
92 # and fall through to the rest of the processing... |
98 # and fall through to the rest of the processing... |
138 { |
144 { |
139 next; # ignore warnings |
145 next; # ignore warnings |
140 } |
146 } |
141 |
147 |
142 $filename =~ s/^.://; # remove drive letter |
148 $filename =~ s/^.://; # remove drive letter |
|
149 $filename =~ s/\\/\//g; # Unix file separators please |
143 |
150 |
144 $message =~ s/"/\"/g; |
151 $message =~ s/"/\"/g; |
145 $message =~ s/&/&/g; |
152 $message =~ s/&/&/g; |
146 $message =~ s/>/>/g; |
153 $message =~ s/>/>/g; |
147 $message =~ s/</</g; |
154 $message =~ s/</</g; |