Skip to content

Commit

Permalink
result/processors: treat all non-Go source as special autogenerated f…
Browse files Browse the repository at this point in the history
…iles

Prior to this change golangci-lint would attempt to follow //line
directives into generation description files unless they were in a small
set of fake files used by goyacc. Now we consider all non-Go source as
special.
  • Loading branch information
kortschak committed Dec 11, 2020
1 parent 21be7d2 commit 33fe87b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/result/processors/autogenerated_exclude.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ func (p *AutogeneratedExclude) Process(issues []result.Issue) ([]result.Issue, e

func isSpecialAutogeneratedFile(filePath string) bool {
fileName := filepath.Base(filePath)
// fake files to which //line points to for goyacc generated files
return fileName == "yacctab" || fileName == "yaccpar" || fileName == "NONE"
// fake files or generation definitions to which //line points to for generated files
return filepath.Ext(fileName) != ".go"
}

func (p *AutogeneratedExclude) shouldPassIssue(i *result.Issue) (bool, error) {
Expand Down

0 comments on commit 33fe87b

Please sign in to comment.