forked from k8sgpt-ai/k8sgpt-operator
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.golangci.yaml
65 lines (65 loc) · 2.01 KB
/
.golangci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
linters:
enable-all: true
disable:
- contextcheck # too many false positives
- deadcode # deprecated (since v1.49.0) and replaced by 'unused'
- depguard # checks if package imports are whitelisted
- exhaustivestruct # deprecated (since v1.46.0) and replaced by 'exhaustruct'
- exhaustruct # TODO enable and fix, use regex to exclude certain cases
- gci # keep disabled for now since it will autofix all imports and result in a git dirty state
- godox # TODO enable and fix
- golint # deprecated (since v1.41.0) and replaced by 'revive'
- ifshort # deprecated (since v1.48.0)
- interfacer # deprecated (since v1.38.0)
- ireturn # TODO enable and fix
- maligned # deprecated (since v1.38.0)
- nlreturn # too strict and mostly code is not more readable
- nosnakecase # deprecated (since v1.48.1) and replaced by 'revive'
- scopelint # deprecated (since v1.39.0) and replaced by 'exportloopref'
- structcheck # deprecated (since v1.49.0) and replaced by 'unused'
- sqlclosecheck # not needed for this project
- varcheck # deprecated (since v1.49.0) and replaced by 'unused'
- wsl # too strict and mostly code is not more readable
- wrapcheck
linters-settings:
gomoddirectives:
replace-allow-list:
- github.com/docker/cli
- github.com/docker/docker
funlen:
lines: 80
cyclop:
max-complexity: 20
nestif:
min-complexity: 6
gci:
sections:
- standard
- default
- prefix(github.com/kyma-project)
ireturn:
allow:
- anon
- error
- empty
- stdlib
- Client
- record.EventRecorder
- client.Object
wrapcheck:
ignorePackageGlobs:
- github.com/kyma-project/lifecycle-manager/pkg/*
- github.com/kyma-project/lifecycle-manager/internal/*
issues:
exclude-rules:
- path: "_test\\.go"
linters:
- wrapcheck
max-issues-per-linter: 0
max-same-issues: 0
output:
sort-results: true
run:
timeout: 15m
skip-files:
- zz_generated.deepcopy.go