| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Git::Lint::Check::Message::BlankLineAfterSummary; |
|
2
|
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
827
|
use strict; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
28
|
|
|
4
|
1
|
|
|
1
|
|
12
|
use warnings; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
29
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
6
|
use parent 'Git::Lint::Check::Message'; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
5
|
|
|
7
|
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = '0.015'; |
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
my $check_name = 'blank line after summary'; |
|
11
|
|
|
|
|
|
|
my $check_description = 'first line must be followed by a blank line'; |
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub check { |
|
14
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
|
15
|
0
|
|
|
|
|
|
my $input = shift; |
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
my $match = sub { |
|
18
|
0
|
|
|
0
|
|
|
my $lines_arref = shift; |
|
19
|
|
|
|
|
|
|
|
|
20
|
0
|
|
|
|
|
|
my @stripped = grep { !/^#/ } @{$lines_arref}; |
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
|
|
22
|
0
|
|
|
|
|
|
my $summary = shift @stripped; |
|
23
|
0
|
|
|
|
|
|
my $second_line = shift @stripped; |
|
24
|
|
|
|
|
|
|
|
|
25
|
0
|
0
|
|
|
|
|
return 1 if $second_line; |
|
26
|
|
|
|
|
|
|
|
|
27
|
0
|
|
|
|
|
|
return; |
|
28
|
0
|
|
|
|
|
|
}; |
|
29
|
|
|
|
|
|
|
|
|
30
|
0
|
|
|
|
|
|
return $self->parse( |
|
31
|
|
|
|
|
|
|
input => $input, |
|
32
|
|
|
|
|
|
|
match => $match, |
|
33
|
|
|
|
|
|
|
check => $check_name . ' (' . $check_description . ')', |
|
34
|
|
|
|
|
|
|
); |
|
35
|
|
|
|
|
|
|
} |
|
36
|
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
1; |
|
38
|
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
__END__ |