Skip to content

Commit 98a3296

Browse files
authored
Update linter configuration (#588)
Signed-off-by: Etai Lev Ran <elevran@gmail.com>
1 parent b52a2c4 commit 98a3296

File tree

2 files changed

+39
-7
lines changed

2 files changed

+39
-7
lines changed

.github/workflows/ci-pr-checks.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ jobs:
7373
with:
7474
version: "v2.1.6"
7575
args: "--config=./.golangci.yml"
76+
skip-cache: true
7677
env:
7778
CGO_ENABLED: ${{ env.CGO_ENABLED }}
7879
CGO_CFLAGS: ${{ env.CGO_CFLAGS }}

.golangci.yml

Lines changed: 38 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,54 @@ formatters:
1111

1212
linters:
1313
enable:
14+
- bodyclose
1415
- copyloopvar
1516
- dupword
1617
- durationcheck
18+
- errcheck
1719
- fatcontext
1820
- ginkgolinter
21+
- goconst
1922
- gocritic
2023
- govet
24+
- ineffassign
2125
- loggercheck
22-
- misspell
23-
- perfsprint
24-
- revive
25-
- unconvert
2626
- makezero
27-
- errcheck
28-
- goconst
29-
- ineffassign
27+
- misspell
3028
- nakedret
29+
- nilnil
30+
- perfsprint
3131
- prealloc
32+
- revive
33+
- staticcheck
3234
- unparam
3335
- unused
36+
- unconvert
37+
settings:
38+
revive: # see https://github.com/mgechev/revive#available-rules for all options
39+
rules:
40+
- name: blank-imports
41+
- name: context-as-argument
42+
- name: context-keys-type
43+
- name: dot-imports
44+
- name: error-return
45+
- name: error-strings
46+
- name: error-naming
47+
- name: exported
48+
- name: if-return
49+
- name: increment-decrement
50+
- name: var-naming
51+
- name: var-declaration
52+
- name: package-comments
53+
- name: range
54+
- name: receiver-naming
55+
- name: time-naming
56+
- name: unexported-return
57+
- name: indent-error-flow
58+
- name: errorf
59+
60+
issues:
61+
# do not limit the number of issues, ensure even identical are reported
62+
max-issues-per-linter: 0
63+
max-same-issues: 0
64+
new: true # run on new code only

0 commit comments

Comments
 (0)