File tree Expand file tree Collapse file tree 4 files changed +35
-39
lines changed
Expand file tree Collapse file tree 4 files changed +35
-39
lines changed Original file line number Diff line number Diff line change @@ -49,11 +49,11 @@ jobs:
4949 - name : Install Shfmt
5050 uses : mfinelli/setup-shfmt@031e887e39d899d773a7e9b6dd6472c2c23ff50d # v3.0.1
5151
52+ - name : Install golangci-lint
53+ run : make install-lint
54+
5255 - name : Golangci-lint
53- uses : golangci/golangci-lint-action@v7
54- with :
55- version : latest
56- args : --timeout 10m0s
56+ run : make lint
5757
5858 - name : Checkmake
5959 run : checkmake --config=.checkmake Makefile
Original file line number Diff line number Diff line change @@ -24,6 +24,36 @@ linters:
2424 - unconvert
2525 - unparam
2626 - whitespace
27+ exclusions :
28+ paths :
29+ - cmd/l2discovery
30+ rules :
31+ # Ignore magic numbers, inline strings and function length in tests.
32+ - path : _test\.go
33+ linters :
34+ - mnd
35+ - goconst
36+ - funlen
37+ - path : config/config.go
38+ linters :
39+ - mnd
40+ - path : _scaling.go
41+ linters :
42+ - gocritic
43+ - path : hugepages.go
44+ linters :
45+ - mnd
46+ - path : scheduling.go
47+ linters :
48+ - mnd
49+ # Ignore line length for string assignments (do not try and wrap regex definitions)
50+ - linters :
51+ - lll
52+ source : " ^(.*= (\" .*\" |`.*`))$"
53+ # https://github.com/go-critic/go-critic/issues/926
54+ - linters :
55+ - gocritic
56+ text : " unnecessaryDefer:"
2757 settings :
2858 dupl :
2959 threshold : 100
@@ -72,35 +102,3 @@ formatters:
72102 enable :
73103 - gofmt
74104 - goimports
75-
76- issues :
77- exclude-dirs :
78- - cmd/l2discovery
79- # Excluding configuration per-path, per-linter, per-text and per-source
80- exclude-rules :
81- # Ignore magic numbers, inline strings and function length in tests.
82- - path : _test\.go
83- linters :
84- - mnd
85- - goconst
86- - funlen
87- - path : config/config.go
88- linters :
89- - mnd
90- - path : _scaling.go
91- linters :
92- - gocritic
93- - path : hugepages.go
94- linters :
95- - mnd
96- - path : scheduling.go
97- linters :
98- - mnd
99- # Ignore line length for string assignments (do not try and wrap regex definitions)
100- - linters :
101- - lll
102- source : " ^(.*= (\" .*\" |`.*`))$"
103- # https://github.com/go-critic/go-critic/issues/926
104- - linters :
105- - gocritic
106- text : " unnecessaryDefer:"
Original file line number Diff line number Diff line change 1- GOLANGCI_VERSION =latest
1+ GOLANGCI_VERSION =v2.8.0
22GO_PACKAGES =$(shell go list ./... | grep -v vendor)
33
44.PHONY : all clean test build build-l2discovery lint install-lint vet fmt image launch
Original file line number Diff line number Diff line change @@ -53,8 +53,6 @@ supports-priv-flags: no`,
5353 })
5454 }
5555}
56-
57- //nolint:funlen
5856func TestParseLspci (t * testing.T ) {
5957 type args struct {
6058 output string
You can’t perform that action at this time.
0 commit comments