This repository was archived by the owner on Oct 5, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy path.golangci.yml
85 lines (78 loc) · 1.76 KB
/
.golangci.yml
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
output:
sort-results: true
issues:
exclude-use-default: false
max-same-issues: 0
max-issues-per-linter: 0
exclude-rules:
linters-settings:
exhaustive:
default-signifies-exhaustive: true
# List for enabled linters can be generated for updates using the following command.
# golangci-lint linters | grep -E '^\S+:' | cut -d: -f1 | sort | sed 's/^/ - /g' | grep -v -E "($(grep '^ disable:' -A 100 .golangci.yml | grep -E ' - \S+$' | awk '{print $2}' | tr \\n '|' | sed 's/|$//g'))"
linters:
disable-all: false
enable:
- asciicheck
- bodyclose
- deadcode
- depguard
- dogsled
- dupl
- errcheck
- errorlint
- exhaustive
- exportloopref
- funlen
- gochecknoglobals
- gochecknoinits
- gocognit
- goconst
- gocritic
- gocyclo
- godot
- gofmt
- gofumpt
- goheader
- goimports
- golint
- gomnd
- gomodguard
- goprintffuncname
- ineffassign
- interfacer
- lll
- maligned
- misspell
- nakedret
- nestif
- nlreturn
- noctx
- nolintlint
- paralleltest
- prealloc
- rowserrcheck
- scopelint
- sqlclosecheck
- structcheck
- stylecheck
- tparallel
- typecheck
- unconvert
- unparam
- varcheck
- whitespace
- wrapcheck
- wsl
disable:
# We use gofmt for formatting and gci is not compatible with it.
- gci
# This code do not export any API returning errors
# and internally there is no need to use typed errors.
- goerr113
# Terraform testing convention do not encourage to use them.
- testpackage
# It is OK to have TODOs in the code.
- godox
# As many structs in this code won't use all the fields and it's OK.
- exhaustivestruct