forked from launchdarkly/ld-relay
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.golangci.yml
47 lines (43 loc) · 1.81 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
project_name: ld-relay
run:
deadline: 120s
tests: false
linters:
enable-all: true
disable:
- funlen # allow long/complex functions for now
- gochecknoglobals
- gochecknoinits
- gocognit # allow long/complex functions for now
- gocritic # very aggressive about preferring switch statements to if/else
- gocyclo
- gofmt
- gomnd # extremely aggressive linter that complains about all numeric literals, even just adding 1 to something (https://github.com/tommy-muehle/go-mnd)
- maligned # don't really care about struct sizes
- unparam
- lll
- whitespace
- wsl # enforces a very specific style with an idiosyncratic definition of what "cuddling" is
fast: false
linter-settings:
gofmt:
simplify: false
issues:
exclude:
# golint exclusions
- "(const|func|method|struct field|type|var) .* should be " # golint errors about variable names (don't want to fix them because they're in a public interface)
- "G104: Errors unhandled." # Let errcheck handle these
- "Error return value of `w.Write` is not checked"
- "should have comment or be unexported" # TODO: label everything that is exported when relay becomes a library
- "ST1005: error strings should not be capitalized"
- "ST1000: at least one file in a package should have a package comment"
# Relay accesses some Go SDK types and methods directly that are deprecated to discourage applications from relying on them;
# these will be replaced in the next major versions of Go SDK and Relay
- "SA1019: ld.FeatureFlag is deprecated.*"
- "SA1019: ld.Features is deprecated.*"
- "SA1019: ld.Segment is deprecated.*"
- "SA1019: ld.Segments is deprecated.*"
- "SA1019: flag.EvaluateDetail is deprecated.*"
exclude-use-default: false
max-same-issues: 1000
max-per-linter: 1000