File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ package dupl
33import (
44 "fmt"
55 "go/token"
6+ "strings"
67 "sync"
78
89 duplAPI "github.com/golangci/dupl"
@@ -56,7 +57,17 @@ func New(settings *config.DuplSettings) *goanalysis.Linter {
5657func runDupl (pass * analysis.Pass , settings * config.DuplSettings ) ([]goanalysis.Issue , error ) {
5758 fileNames := internal .GetFileNames (pass )
5859
59- issues , err := duplAPI .Run (fileNames , settings .Threshold )
60+ var onlyGofiles []string
61+ for _ , name := range fileNames {
62+ // Related to Windows
63+ if ! strings .HasSuffix (name , ".go" ) {
64+ continue
65+ }
66+
67+ onlyGofiles = append (onlyGofiles , name )
68+ }
69+
70+ issues , err := duplAPI .Run (onlyGofiles , settings .Threshold )
6071 if err != nil {
6172 return nil , err
6273 }
You can’t perform that action at this time.
0 commit comments