Skip to content

Commit ba52f42

Browse files
committed
Configure errcheck to skip test files
1 parent 8a1565f commit ba52f42

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

hack/verify.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,12 @@ linters-settings:
3636
min-len: 3
3737
lll:
3838
line-length: 170
39-
tab-width: 1" > /tmp/.golangci-lint-config.yml
39+
tab-width: 1
40+
issues:
41+
exclude-rules:
42+
- path: _test\.go
43+
linters:
44+
- errcheck"> /tmp/.golangci-lint-config.yml
4045

4146
header_text "running golangci-lint"
4247

@@ -48,6 +53,7 @@ golangci-lint run --disable-all \
4853
--enable=golint \
4954
--enable=deadcode \
5055
--enable=goimports \
56+
--enable=errcheck \
5157
--enable=varcheck \
5258
--enable=goconst \
5359
--enable=unparam \
@@ -62,7 +68,6 @@ golangci-lint run --disable-all \
6268
--enable=goimports \
6369
./pkg/... ./examples/... .
6470
# TODO: Enable these as we fix them to make them pass
65-
# --enable=errcheck \
6671
# --enable=gosec \
6772
# --enable=maligned \
6873
# --enable=safesql \

0 commit comments

Comments
 (0)