blob: b57bc0c061a68d0ba434e581b1e20b22696c76ed (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#!/usr/bin/perl
my $in = 0;
my $line = 1;
while (<>) {
chomp;
my $l = $_;
my @w = split(/\s+/, $_);
for (@w) {
if (/^(\/\/)?dout\(\s*\-?\s*\d+\s*\)$/) {
warn "$line: dout without dendl: $l\n" if $in;
$in = 1;
}
elsif (/^derr\(\s*\-?\s*\d+\s*\)$/) {
warn "$line: dout without dendl: $l\n" if $in;
$in = 1;
}
elsif (/^dendl/) {
warn "$line: dendl without dout: $l\n" unless $in;
$in = 0;
}
}
$line++;
}
|