forked from antrea-io/antrea
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.golangci.yml
More file actions
67 lines (66 loc) · 1.76 KB
/
Copy path.golangci.yml
File metadata and controls
67 lines (66 loc) · 1.76 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
# golangci-lint configuration used for CI
version: "2"
run:
tests: true
timeout: 15m
linters:
default: none
enable:
- gosec
- govet
- loggercheck
- misspell
- revive
- staticcheck
- unused
settings:
gosec:
excludes:
# At the time of writing this, the G115 rule is not even part of an
# official release of gosec. This rule causes a lot of errors to be
# reported in the codebase. While some of the reported errors should be
# addressed, a lot can also be ignored and there are also some clear false
# positives that should not be flagged by gosec in the first place (see
# https://github.com/securego/gosec/issues/1187). We will re-enable this
# rule in the future when it becomes more accurate.
- G115 # Potential integer overflow when converting between integer types
misspell:
ignore-rules:
- creater
revive:
confidence: 0.8
severity: warning
rules:
- name: unreachable-code
- name: errorf
- name: range
- name: superfluous-else
- name: var-declaration
- name: duplicated-imports
exclusions:
presets:
- legacy
- common-false-positives
paths:
- ^third_party/.*
rules:
- linters:
- staticcheck
# ST1005: error strings must be capitalized
# QF1008: unneccessary use of embedded struct name before field e.g:
# ClusterNetworkPolicy.Metadata.Name vs ClusterNetworkPolicy.Name
text: "(ST1005:|QF1008:)"
formatters:
enable:
- gofmt
- goimports
settings:
goimports:
local-prefixes:
- antrea.io/antrea
exclusions:
paths:
- ^third_party/.*
issues:
max-issues-per-linter: 0
max-same-issues: 0