-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy path.golangci.yml
More file actions
86 lines (85 loc) · 2.8 KB
/
.golangci.yml
File metadata and controls
86 lines (85 loc) · 2.8 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
version: "2"
run:
allow-parallel-runners: true
linters:
default: none
enable:
- asasalint # warns about passing []any to func(...any) without expanding it
- asciicheck # non ascii symbols
- bidichk # dangerous unicode sequences
- bodyclose # unclosed http bodies
- containedctx # context.Context nested in a struct
- copyloopvar # copying loop variables
- dogsled # too many blank identifiers in assignments
- dupword # duplicate words
- durationcheck # multiplying two durations
- errcheck # unchecked errors
- errchkjson # invalid types passed to json encoder
- forbidigo # allows to block usage of funcs
- ginkgolinter # ginkgo and gomega
- gocritic # bugs, performance, style (we could add custom ones to this one)
- godot # checks that comments end in a period
- godox # block FIXMEs
- goprintffuncname # printft-like functions should be named with f at the end
- gosec # potential security problems
- govet # basically 'go vet'
- importas # consistent import aliases
- ineffassign # ineffectual assignments
- intrange # suggest using integer range in for loops
- loggercheck # check for even key/value pairs in logger calls
- misspell # spelling
- nakedret # naked returns (named return parameters and an empty return)
- nilerr # returning nil after checking err is not nil
- noctx # http requests without context.Context
- nolintlint # badly formatted nolint directives
- nosprintfhostport # using sprintf to construct host:port in a URL
- prealloc # suggest preallocating slices
- predeclared # shadowing predeclared identifiers
- revive # better version of golint
- staticcheck # some of staticcheck's rules
- thelper # test helpers not starting with t.Helper()
- unconvert # unnecessary type conversions
- unparam # unused function parameters
- unused # unused constants, variables,functions, types
- usestdlibvars # using variables/constants from the standard library
- usetesting # report function to be replaced by testing
- whitespace # unnecessary newlines
settings:
revive:
rules:
- name: comment-spacings
- name: import-shadowing
godox:
keywords:
- FIXME # FIXME's should be removed before merging PRs
exclusions:
generated: lax
rules:
- linters:
- lll
path: api/*
- linters:
- dupl
- lll
path: internal/*
- linters:
- gosec
path: "test/utils/"
text: "G204"
- linters:
- noctx
path: "test/utils/"
paths:
- third_party$
- builtin$
- examples$
formatters:
enable:
- gofmt
- goimports
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$