forked from emissary-ingress/emissary
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.golangci.yml
107 lines (104 loc) · 2.98 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
# Start with a very conservative configuration, and slowly turn things
# back on.
linters:
disable-all: true
enable:
- gofmt
- govet
linters-settings:
gofmt:
simplify: true
govet:
disable:
- lostcancel
issues:
exclude-rules:
- linters: [govet]
path: pkg/envoy-control-plane/
- linters: [govet]
text: "^tests: .* should return nothing$"
run:
timeout: 9m # CircleCI is slow?
# I don't know of a linter that lets you blacklist specific functions
# and variables within a package, but if one exists, I would like to
# blacklist all of the following for the reason "Don't use globals!":
#
# - net/http.DefaultServeMux
# * net/http.Handle()
# * net/http.HandleFunc()
# - flag.CommandLine
# * flag.VisitAll()
# * flag.Visit()
# * flag.Lookup()
# * flag.Set()
# * flag.PrintDefaults()
# * flag.Usage()
# * flag.NFlag()
# * flag.Arg()
# * flag.NArg()
# * flag.Args()
# * flag.BoolVar()
# * flag.Bool()
# * flag.IntVar()
# * flag.Int()
# * flag.Int64Var()
# * flag.Int64()
# * flag.UintVar()
# * flag.Uint()
# * flag.Uint64Var()
# * flag.Uint64()
# * flag.StringVar()
# * flag.String()
# * flag.Float64Var()
# * flag.Float64()
# * flag.DurationVar()
# * flag.Duration()
# * flag.Var()
# * flag.Parse()
# * flag.Parsed()
# The old configuration, that hasn't been used for many months:
#linters:
# enable-all: true
# disable:
# - errcheck
# - gochecknoglobals
# - gochecknoinits
# - golint
# - interfacer # author says it's deprecated, gives very subjective advice
# - lll
# - maligned
# - prealloc
# - scopelint
# - stylecheck
# - unparam
# - unused # confused by dev-portal-server, for some reason
#linters-settings:
# unused:
# # treat code as a program (not a library) and report unused
# # exported identifiers
# check-exported: true
# goimports:
# # put imports beginning with prefix after 3rd-party packages;
# # it's a comma-separated list of prefixes
# local-prefixes: github.com/datawire/apro,github.com/lyft/ratelimit
# depguard:
# list-type: blacklist
# include-go-root: true
# packages:
# - errors # use "github.com/pkg/errors"
# - golang.org/x/net/context # use "context"
# - github.com/datawire/teleproxy # use "github.com/datawire/ambassador/pkg"
# - github.com/datawire/ambassador/go # use "github.com/datawire/ambassador/pkg"
# - github.com/datawire/kat-backend/xds # use "github.com/datawire/ambassador/pkg/api/envoy"
# - github.com/lyft/ratelimit/proto # use "github.com/datawire/ambassador/pkg/api/envoy"
# #- github.com/russross/blackfriday # use "github.com/russross/blackfriday/v2" # can't turn off prefix-matching
# - gopkg.in/russross/blackfriday.v2 # use "github.com/russross/blackfriday/v2"
# goconst:
# min-len: 12
#issues:
# new-from-rev: a72c53cbcd05c806b1838d95146d049b09a51ffb
#run:
# build-tags:
# - test
# - integration
# - lint