result/processors: treat all non-Go source as special autogenerated files
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.
This commit is contained in:
parent
21be7d2dcf
commit
33fe87b2a5
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user