-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.golangci.yml
110 lines (95 loc) · 2.56 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
run:
# timeout for analysis, e.g. 30s, 5m, default is 1m
timeout: 4m
# exit code when at least one issue was found, default is 1
issues-exit-code: 1
# include test files or not, default is true
tests: true
# list of build tags, all linters use it. Default is empty list.
build-tags:
- integration
- contract_test_provider
- contract_test_consumer
# output configuration options
output:
# colored-line-number|line-number|json|tab|checkstyle|code-climate, default is "colored-line-number"
format: line-number
# print lines of code with issue, default is true
print-issued-lines: false
linters:
# Start with all linters disabled and white list wanted linters
disable-all: true
# Enabled linters
enable:
- bodyclose
- deadcode
- depguard
- dogsled
- dupl
- errcheck
- errorlint
- exportloopref
- gochecknoinits
- gocognit
- gocritic
- gocyclo
- gofumpt
- goimports
- goprintffuncname
- gosec
- gosimple
- govet
- govet
- ineffassign
- megacheck
- misspell
- nakedret
- prealloc
- rowserrcheck
- staticcheck
- structcheck
- stylecheck
- typecheck
- unconvert
- unparam
- unused
- varcheck
- whitespace
# Linters that are not used
# disable:
# - lll
# - gochecknoglobals
# - goconst
# - maligned
# - godox
# - funlen
# - wsl
# - gomnd
# Run only linter supporting fast option
fast: false
issues:
# List of regexps of issue texts to exclude, empty list by default.
# But independently from this option we use default exclude patterns,
# it can be disabled by `exclude-use-default: false`. To list all
# excluded by default patterns execute `golangci-lint run --help`
exclude:
- ".*DNs.*should be.*DNS.*"
# Excluding configuration per-path, per-linter, per-text and per-source
exclude-rules:
- path: svc/
text: "should have comment"
linters:
- golint
- path: svc/
text: "at least one file in a package should have a package comment"
linters:
- stylecheck
# Independently from option `exclude` we use default exclude patterns,
# it can be disabled by this option. To list all
# excluded by default patterns execute `golangci-lint run --help`.
# Default value for this option is true.
exclude-use-default: false
# Maximum issues count per one linter. Set to 0 to disable. Default is 50.
max-issues-per-linter: 0
# Maximum count of issues with the same text. Set to 0 to disable. Default is 3.
max-same-issues: 0