forked from projectcontour/contour
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.yml
118 lines (115 loc) · 3.26 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
108
109
110
111
112
113
114
115
116
117
118
run:
timeout: 10m
linters:
enable:
- bodyclose
- gofumpt
- goimports
- gci
- importas
- revive
- gosec
- misspell
- unconvert
- unparam
- goheader
- gocritic
- forbidigo
- testifylint
- ginkgolinter
linters-settings:
misspell:
ignore-words:
- clas
- cancelled
locale: US
unparam:
check-exported: false
goheader:
template-path: ./hack/license-template.txt
forbidigo:
forbid:
- http.DefaultTransport
revive:
rules:
- name: blank-imports
- name: context-as-argument
- name: context-keys-type
- name: dot-imports
- name: empty-block
- name: error-naming
- name: error-return
- name: error-strings
- name: errorf
- name: exported
- name: increment-decrement
- name: indent-error-flow
- name: package-comments
- name: range
- name: receiver-naming
- name: redefines-builtin-id
- name: superfluous-else
- name: time-naming
- name: unexported-return
- name: unreachable-code
- name: unused-parameter
- name: use-any
- name: var-declaration
- name: var-naming
testifylint:
enable-all: true
ginkgolinter:
forbid-focus-container: true
gofumpt:
extra-rules: true
gci:
custom-order: true
sections:
- standard
- default
- prefix(github.com/projectcontour/contour)
importas:
no-unaliased: true
alias:
- pkg: github.com/projectcontour/contour/apis/projectcontour/(v\w+)
alias: contour_${1}
- pkg: sigs.k8s.io/gateway-api/apis/(v\w+)
alias: gatewayapi_${1}
- pkg: k8s.io.*/apis?/(\w+)/(v\w+)
alias: ${1}_${2}
- pkg: github.com/envoyproxy/go-control-plane/envoy/config/(\w+)/(v\w+)
alias: envoy_config_${1}_${2}
- pkg: github.com/envoyproxy/go-control-plane/envoy/service/(\w+)/(v\w+)
alias: envoy_service_${1}_${2}
- pkg: github.com/envoyproxy/go-control-plane/envoy/extensions/filters/(\w+)/(\w+)/(v\w+)
alias: envoy_filter_${1}_${2}_${3}
- pkg: github.com/envoyproxy/go-control-plane/envoy/extensions/transport_sockets/(\w+)/(v\w+)
alias: envoy_transport_socket_${1}_${2}
- pkg: github.com/envoyproxy/go-control-plane/envoy/extensions/compression/(\w+)/(\w+)/(v\w+)
alias: envoy_compression_${1}_${2}_${3}
- pkg: github.com/envoyproxy/go-control-plane/envoy/extensions/access_loggers/(\w+)/(v\w+)
alias: envoy_access_logger_${1}_${2}
- pkg: github.com/envoyproxy/go-control-plane/envoy/extensions/formatter/(\w+)/(v\w+)
alias: envoy_formatter_${1}_${2}
- pkg: github.com/envoyproxy/go-control-plane/envoy/extensions/upstreams/(\w+)/(v\w+)
alias: envoy_upstream_${1}_${2}
- pkg: github.com/envoyproxy/go-control-plane/envoy/type/(v\w+)
alias: envoy_type_${1}
- pkg: github.com/envoyproxy/go-control-plane/envoy/type/matcher/(v\w+)
alias: envoy_matcher_${1}
issues:
max-issues-per-linter: 0
max-same-issues: 0
exclude-rules:
- linters: ["unparam"]
text: "always receives"
- path: zz_generated
linters: ["goimports"]
- path: test/e2e
linters: ["bodyclose"]
- path: test/e2e
linters: ["revive"]
text: "should not use dot imports"
- path: test/e2e
linters: ["testifylint"]
text: "require must only be used in the goroutine running the test function"