Skip to content

Commit 2b2fc8c

Browse files
authored
fix: skip go.mod report inside autogenerated_exclude processor (#4663)
1 parent 8fb9856 commit 2b2fc8c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/result/processors/autogenerated_exclude.go

+5
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"fmt"
55
"go/parser"
66
"go/token"
7+
"path/filepath"
78
"regexp"
89
"strings"
910

@@ -57,6 +58,10 @@ func (p *AutogeneratedExclude) shouldPassIssue(issue *result.Issue) (bool, error
5758
return true, nil
5859
}
5960

61+
if filepath.Base(issue.FilePath()) == "go.mod" {
62+
return true, nil
63+
}
64+
6065
// The file is already known.
6166
fs := p.fileSummaryCache[issue.FilePath()]
6267
if fs != nil {

0 commit comments

Comments
 (0)