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
3
3
import (
4
4
"fmt"
5
5
"go/token"
6
+ "strings"
6
7
"sync"
7
8
8
9
duplAPI "github.com/golangci/dupl"
@@ -56,7 +57,17 @@ func New(settings *config.DuplSettings) *goanalysis.Linter {
56
57
func runDupl (pass * analysis.Pass , settings * config.DuplSettings ) ([]goanalysis.Issue , error ) {
57
58
fileNames := internal .GetFileNames (pass )
58
59
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 )
60
71
if err != nil {
61
72
return nil , err
62
73
}
You can’t perform that action at this time.
0 commit comments