Repository navigation
Expand file tree
/
Copy path.golangci.yml
More file actions
63 lines (59 loc) · 1.61 KB
/
Copy path.golangci.yml
File metadata and controls
63 lines (59 loc) · 1.61 KB
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
version: "2"
run:
timeout: 5m
formatters:
enable:
- gofmt
- goimports
linters:
enable:
- errcheck # check for unchecked errors
- govet # reports suspicious constructs
- staticcheck # comprehensive static analysis
- unused # find unused code
- ineffassign # detect ineffectual assignments
- misspell # find misspelled words
- unconvert # remove unnecessary conversions
- gocritic # opinionated Go linter
- revive # extensible linter (replacement for golint)
- bodyclose # check HTTP response body is closed
- noctx # check for http requests without context
settings:
revive:
rules:
- name: exported
arguments:
- "checkPrivateReceivers"
- name: blank-imports
- name: context-as-argument
- name: error-return
- name: error-naming
- name: increment-decrement
- name: var-naming
- name: range
- name: receiver-naming
- name: indent-error-flow
- name: empty-block
- name: superfluous-else
- name: unreachable-code
- name: redefines-builtin-id
gocritic:
enabled-tags:
- diagnostic
- style
- performance
disabled-checks:
- ifElseChain # too opinionated
- hugeParam # not always actionable
misspell:
locale: US
exclusions:
rules:
- path: _test\.go$
linters:
- gocritic
- revive
- errcheck
issues:
max-issues-per-linter: 50
max-same-issues: 5