Skip to content

Commit 2016668

Browse files
committed
fix: fixing lint issues
1 parent 96e5837 commit 2016668

File tree

1 file changed

+31
-10
lines changed

1 file changed

+31
-10
lines changed

.golangci.yml

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,16 @@ run:
22
timeout: 5m
33
issues-exit-code: 1
44
tests: true
5-
skip-dirs:
6-
- vendor
7-
skip-files:
8-
- ".*\\.pb\\.go$"
95

106
linters:
117
enable:
128
- gofmt
13-
- golint
149
- govet
1510
- errcheck
1611
- staticcheck
1712
- unused
1813
- gosimple
19-
- structcheck
20-
- varcheck
2114
- ineffassign
22-
- deadcode
2315
- typecheck
2416
- gosec
2517
- misspell
@@ -28,11 +20,17 @@ linters:
2820
- goconst
2921
- goimports
3022
- revive
31-
- exportloopref
3223
- noctx
3324
- rowserrcheck
3425
- sqlclosecheck
3526
- unparam
27+
- gocritic
28+
- gci
29+
- whitespace
30+
- wsl
31+
disable: []
32+
# Note: Deprecated linters (golint, structcheck, varcheck, deadcode, scopelint, exportloopref)
33+
# are automatically disabled by golangci-lint
3634

3735
linters-settings:
3836
gocyclo:
@@ -53,8 +51,20 @@ linters-settings:
5351
- G204 # Subprocess launched with variable
5452
- G301 # Expect directory permissions to be 0750 or less
5553
- G302 # Expect file permissions to be 0600 or less
54+
revive:
55+
rules:
56+
- name: exported
57+
arguments: ["sayRepetitiveInsteadOfStutters"]
58+
- name: package-comments
59+
disabled: true
60+
- name: var-naming
61+
arguments: [["ID"], ["VM"]]
5662

5763
issues:
64+
exclude-dirs:
65+
- vendor
66+
exclude-files:
67+
- ".*\\.pb\\.go$"
5868
exclude-rules:
5969
# Exclude some linters from running on tests files.
6070
- path: _test\.go
@@ -63,6 +73,7 @@ issues:
6373
- errcheck
6474
- dupl
6575
- gosec
76+
- gocritic
6677
# Exclude known linters from partially hard-to-fix issues
6778
- linters:
6879
- errcheck
@@ -73,11 +84,21 @@ issues:
7384
- linters:
7485
- gosec
7586
text: "G204: Subprocess launched with function call as argument or cmd arguments"
87+
# Ignore some gocritic checks that are too strict
88+
- linters:
89+
- gocritic
90+
text: "commentedOutCode"
91+
# Exclude some wsl (whitespace) checks that are too strict
92+
- linters:
93+
- wsl
94+
text: "(return statements should not be cuddled|assignments should only be cuddled|only one cuddle assignment allowed)"
7695

7796
max-issues-per-linter: 0
7897
max-same-issues: 0
7998

8099
output:
81-
format: colored-line-number
100+
formats:
101+
- format: colored-line-number
82102
print-issued-lines: true
83103
print-linter-name: true
104+
sort-results: true

0 commit comments

Comments
 (0)