-
Notifications
You must be signed in to change notification settings - Fork 164
/
.golangci.yml
107 lines (99 loc) · 2.41 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
# Golangci-lint documentation: https://golangci-lint.run/
# Analysis running options
run:
# Timeout for analysis
timeout: 5m
# Disable tests to avoid redundancy with test workflow
tests: false
issues:
# Dirs to ignore
exclude-dirs:
- internal/terraform
# Maximum issues count per one linter
max-issues-per-linter: 0
# Maximum count of issues with the same text
max-same-issues: 0
# Configuration of specific linters
linters-settings:
gosec:
# Rules to explicitly exclude
# Available rules: https://github.com/securego/gosec#available-rules
excludes:
- G401
- G501
revive:
# see https://github.com/mgechev/revive#available-rules for details
ignore-generated-header: false
severity: warning
confidence: 0.8
rules:
- name: blank-imports
severity: warning
- name: context-as-argument
severity: warning
- name: context-keys-type
severity: warning
- name: cyclomatic
severity: warning
arguments:
- 15 # Maximum cyclomatic complexity
- name: error-return
severity: warning
- name: error-strings
severity: warning
- name: error-naming
severity: warning
- name: exported
severity: warning
- name: if-return
severity: warning
- name: increment-decrement
severity: warning
- name: var-naming
severity: warning
- name: var-declaration
severity: warning
- name: package-comments
severity: warning
- name: range
severity: warning
- name: receiver-naming
severity: warning
- name: time-naming
severity: warning
- name: unexported-return
severity: warning
- name: indent-error-flow
severity: warning
- name: errorf
severity: warning
- name: empty-block
severity: warning
- name: superfluous-else
severity: warning
- name: unused-parameter
severity: warning
- name: unreachable-code
severity: warning
- name: redefines-builtin-id
severity: warning
misspell:
locale: US
# Activated linters by default:
# - deadcode
# - errcheck
# - gosimple
# - govet
# - ineffassign
# - staticcheck
# - structcheck
# - typecheck
# - unused
# - varcheck
linters:
# Additional linters activated
enable:
- goimports
- gosec
- misspell
- revive