Skip to content

Commit bb62c25

Browse files
committed
Fix
1 parent 105c3f1 commit bb62c25

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

evaluator.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ func (e Evaluator) Evaluate(r io.Reader) ([]*gitdiff.File, []*Reasons, []*Reason
2424
}
2525

2626
noValue := []Filterer{
27+
SuffixFilterer{".md"},
2728
PrefixFilterer{"vendor/"},
2829
ContainsFilterer{"generated", "testdata"},
2930
CommentFilterer{},
@@ -134,6 +135,9 @@ func (s CommentFilterer) Filter(file *gitdiff.File) *Reasons {
134135
if line.Op != gitdiff.OpAdd {
135136
continue
136137
}
138+
if strings.TrimSpace(line.Line) == "" {
139+
continue
140+
}
137141
if strings.HasPrefix(strings.TrimSpace(line.Line), "//") {
138142
continue
139143
}

0 commit comments

Comments
 (0)