-
Notifications
You must be signed in to change notification settings - Fork 56
Expand file tree
/
Copy path.golangci.yml
More file actions
99 lines (85 loc) · 2.82 KB
/
Copy path.golangci.yml
File metadata and controls
99 lines (85 loc) · 2.82 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
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
version: "2"
run:
concurrency: 4
timeout: 5m
issues-exit-code: 1
tests: true
build-tags:
- integration
- fixtures
modules-download-mode: readonly
output:
formats:
text:
print-linter-name: true
print-issued-lines: true
colors: true
path: stdout
formatters:
enable:
- gofumpt
linters:
default: none
enable:
- dogsled # Checks assignments with too many blank identifiers (e.g. x, , , _, := f()).
- dupword # Checks for duplicate words in the source code.
- errcheck # Errcheck is a program for checking for unchecked errors in Go code. These unchecked errors can be critical bugs in some cases.
- gocognit # Computes and checks the cognitive complexity of functions.
- goconst # Finds repeated strings that could be replaced by a constant.
- gocritic # Provides diagnostics that check for bugs, performance and style issues.
- godox # Tool for detection of FIXME, TODO and other comment keywords.
- govet # Vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string.
- ineffassign # Detects when assignments to existing variables are not used.
- lll # Reports long lines.
- misspell # Finds commonly misspelled English words in comments.
- nestif # Reports deeply nested if statements.
- nlreturn # Nlreturn checks for a new line before return and branch statements to increase code clarity.
- nolintlint # Reports ill-formed or insufficient nolint directives
- revive # Fast, configurable, extensible, flexible, and beautiful linter for Go. Drop-in replacement of golint.
- staticcheck # It's a set of rules from staticcheck.
- unused # Checks Go code for unused constants, variables, functions and types.
- usetesting # Use the testing package instead of the deprecated test package, replacement for tenv
- whitespace # Whitespace is a linter that checks for unnecessary newlines at the start and end of functions, if, for, etc.
exclusions:
rules:
- linters:
- dogsled
- goconst
- lll
path: _test\.go
settings:
errcheck:
check-type-assertions: false
check-blank: true
disable-default-exclusions: false
gocognit:
min-complexity: 20
gocritic:
disabled-checks:
- paramTypeCombine
- importShadow
enabled-tags:
- diagnostic
- style
- experimental
- opinionated
godox:
keywords:
- TODO
- BUG
- FIXME
lll:
line-length: 240
nestif:
min-complexity: 4
nolintlint:
allow-unused: false
require-explanation: true
require-specific: true
revive:
rules:
- name: use-any
issues:
max-issues-per-linter: 0
max-same-issues: 0
new: false