Skip to content

Commit

Permalink
fix: skip go.mod report inside autogenerated_exclude processor (#4663)
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez committed Apr 21, 2024
1 parent 8fb9856 commit 2b2fc8c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/result/processors/autogenerated_exclude.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"
"go/parser"
"go/token"
"path/filepath"
"regexp"
"strings"

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

if filepath.Base(issue.FilePath()) == "go.mod" {
return true, nil
}

// The file is already known.
fs := p.fileSummaryCache[issue.FilePath()]
if fs != nil {
Expand Down

0 comments on commit 2b2fc8c

Please sign in to comment.