Skip to content

Commit dcdfa16

Browse files
committed
chore: introduce new linters
Signed-off-by: Bence Csati <[email protected]>
1 parent 98552ac commit dcdfa16

File tree

1 file changed

+30
-2
lines changed

1 file changed

+30
-2
lines changed

.golangci.yml

+30-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,20 @@ run:
22
timeout: 5m
33
allow-parallel-runners: true
44

5+
linters-settings:
6+
gci:
7+
sections:
8+
- standard
9+
- default
10+
- prefix(github.com/kube-logging/telemetry-controller)
11+
goimports:
12+
local-prefixes: github.com/kube-logging/telemetry-controller
13+
misspell:
14+
locale: US
15+
nolintlint:
16+
allow-unused: false # report any unused nolint directives
17+
require-specific: false # don't require nolint directives to be specific about which linter is being skipped
18+
519
issues:
620
# don't skip warning about doc comments
721
# don't exclude the default set of lint
@@ -12,28 +26,42 @@ issues:
1226
- path: "api/*"
1327
linters:
1428
- lll
15-
- path: "internal/*"
29+
- path: "pkg/resources/*"
30+
linters:
31+
- dupl
32+
- lll
33+
- path: "controllers/*"
1634
linters:
1735
- dupl
1836
- lll
37+
- gci
38+
- path: "cmd/main.go"
39+
linters:
40+
- gci
41+
1942
linters:
2043
disable-all: true
2144
enable:
45+
- bodyclose
2246
- copyloopvar
2347
- dupl
2448
- errcheck
49+
- gci
2550
- goconst
2651
- gocyclo
2752
- gofmt
53+
- gofumpt
2854
- goimports
2955
- gosimple
3056
- govet
3157
- ineffassign
3258
- lll
3359
- misspell
60+
- nolintlint
3461
- prealloc
3562
- staticcheck
3663
- typecheck
3764
- unconvert
38-
- unparam
65+
- unparam
3966
- unused
67+
- whitespace

0 commit comments

Comments
 (0)