-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy path.golangci.yml
69 lines (65 loc) · 1.79 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
# options for analysis running
run:
modules-download-mode: readonly
deadline: 10m
timeout: 10m
issues:
exclude-rules:
# ignore code duplication in tests
- path: _test\.go
linters:
- dupl
# ignore deprecation warnings for golang/protobuf
- path: \.go
linters:
- staticcheck
text: '"github.com/golang/protobuf/proto" is deprecated'
# output configuration options
output:
print-issued-lines: false
sort-results: true
uniq-by-line: false
linters:
# these are disabled by default so turn them on
enable:
- dupl
- errname
- exhaustive
- gochecknoinits
- goimports
- gosec
- lll
- nolintlint
- predeclared
- revive
- stylecheck
- unconvert
- unparam
linters-settings:
exhaustive:
# check switch statements in generated files also
check-generated: false
# indicates that switch statements are to be considered exhaustive if a
# 'default' case is present, even if all enum members aren't listed in the
# switch
default-signifies-exhaustive: true
goimports:
local-prefixes: github.com/CrowdStrike
lll:
line-length: 200
tab-width: 4
nolintlint:
# allow unused nolint to avoid false positives for linters that are temporarily disabled under go1.18
# . see https://github.com/golangci/golangci-lint/issues/2649
allow-unused: true
require-explanation: true
revive:
ignore-generated-header: true
min-confidence: 0
gosec:
excludes:
# disable "Potential integer overflow when converting between integer types"
# - we have to do A LOT of conversions between integer types when encoding/decoding so there
# are lots of _potential_ overflows
# - more efficient to disable this check globally than for each line
- G115