File tree Expand file tree Collapse file tree 4 files changed +31
-4
lines changed Expand file tree Collapse file tree 4 files changed +31
-4
lines changed Original file line number Diff line number Diff line change
1
+ # https://github.com/uber-go/nilaway
2
+ # https://github.com/golangci/golangci-lint/releases/tag/v1.61.0
3
+
4
+ # This has to be >= v1.57.0 for module plugin system support.
5
+ version : v1.61.0
6
+ plugins :
7
+ - module : " go.uber.org/nilaway"
8
+ import : " go.uber.org/nilaway/cmd/gclplugin"
9
+ version : latest # Or a fixed version for reproducible builds.
Original file line number Diff line number Diff line change @@ -25,11 +25,17 @@ jobs:
25
25
- uses : actions/checkout@v4
26
26
with :
27
27
submodules : recursive
28
+
28
29
- uses : actions/setup-go@v5
29
30
with :
30
31
cache : false
31
32
go-version-file : go.mod
32
- - name : golangci-lint
33
- uses : golangci/golangci-lint-action@v3
34
- with :
35
- args : --config=.golangci.yml -v
33
+
34
+ - name : Install golangci-lint
35
+ run :
go install github.com/golangci/golangci-lint/cmd/[email protected]
36
+
37
+ - name : Build custom golangci-lint
38
+ run : golangci-lint custom
39
+
40
+ - name : Run golangci-lint
41
+ run : ./custom-gcl run --verbose --config=.golangci.yml ./...
Original file line number Diff line number Diff line change @@ -10,16 +10,28 @@ linters-settings:
10
10
gofmt :
11
11
# simplify code: gofmt with `-s` option, true by default
12
12
simplify : true
13
+
13
14
goimports :
14
15
# put imports beginning with prefix after 3rd-party packages;
15
16
# it's a comma-separated list of prefixes
16
17
local-prefixes : lepton.ai/lepton
18
+
17
19
misspell :
18
20
# Correct spellings using locale preferences for US or UK.
19
21
# Default is to use a neutral variety of English.
20
22
# Setting locale to US will correct the British spelling of 'colour' to 'color'.
21
23
locale : US
22
24
25
+ custom :
26
+ # ref. https://github.com/uber-go/nilaway
27
+ nilaway :
28
+ type : " module"
29
+ description : Static analysis tool to detect potential nil panics in Go code.
30
+ settings :
31
+ include-pkgs : " github.com/leptonai/gpud"
32
+ exclude-pkgs : " github.com/leptonai/gpud/third_party"
33
+ experimental-anonymous-function : " true"
34
+
23
35
linters :
24
36
fast : false
25
37
disable-all : true
You can’t perform that action at this time.
0 commit comments