line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Git::Lint::Check::Message::SummaryEndingPeriod; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
1012
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
27
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
29
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
6
|
use parent 'Git::Lint::Check::Message'; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
7
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
our $VERSION = '0.015'; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
my $check_name = 'summary ending period'; |
11
|
|
|
|
|
|
|
my $check_description = 'summary must not end with a period'; |
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
|
0
|
|
|
|
|
|
my $summary = shift @{$lines_arref}; |
|
0
|
|
|
|
|
|
|
20
|
0
|
0
|
|
|
|
|
return 1 if $summary =~ /\.$/; |
21
|
0
|
|
|
|
|
|
return; |
22
|
0
|
|
|
|
|
|
}; |
23
|
|
|
|
|
|
|
|
24
|
0
|
|
|
|
|
|
return $self->parse( |
25
|
|
|
|
|
|
|
input => $input, |
26
|
|
|
|
|
|
|
match => $match, |
27
|
|
|
|
|
|
|
check => $check_name . ' (' . $check_description . ')', |
28
|
|
|
|
|
|
|
); |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
__END__ |