forked from flant/shell-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.golangci.yaml
80 lines (74 loc) · 2.34 KB
/
.golangci.yaml
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
run:
timeout: 15m
skip-dirs:
- test/integration
linters:
disable-all: true
enable:
- asciicheck
- bodyclose
- depguard
- dogsled
- durationcheck
- exportloopref
- gci
- gochecknoinits
- gocritic
- gofmt
- gofumpt
- goprintffuncname
- gosimple
- govet
- ineffassign
- misspell
- nolintlint
- prealloc
- revive
- staticcheck
- stylecheck
- unconvert
- unused
- whitespace
linters-settings:
gci:
sections:
- standard
- default
- prefix(github.com/flant/)
goimports:
local-prefixes: github.com/flant/
nolintlint:
allow-unused: true
depguard:
rules:
Main:
files:
- $all
deny:
- pkg: "gopkg.in/satori/go.uuid.v1"
desc: "Use https://github.com/gofrs/uuid instead. Satori/go.uuid is no longer maintained and has critical vulnerabilities."
issues:
exclude:
# Using underscores is a common practice, refactor in the future
- "var-naming: don't use an underscore in package name" # revive
- "ST1003: should not use underscores in package names" # stylecheck
# Sometime errors are used to propagate messages for end-users
- "ST1005: error strings should not be capitalized" # stylecheck
- "error-strings: error strings should not be capitalized or end with punctuation or a newline" # revive
- "ST1005: error strings should not end with punctuation or newlines" # stylecheck
# Dot imports are used for types, consider refactoring
- "dot-imports: should not use dot imports" # revive
- "ST1001: should not use dot imports" # stylecheck
# Init functions are used for global variables' initialization, consider refactoring
- "don't use `init` function"
# Suggests changing Json -> JSON. Figure out which style we want to follow.
- "var-naming:" # revive
- "ST1003: " # stylecheck
# Exported name should not start with the package name, e.g., helm3.Helm3Options.
# However, this penetrates all the code and sometimes is used to avoid name collisions.
# Nice to refactor, but not necessary.
- "exported: type name will be used as" # revive
# It is annoying be design, consider refactoring
- "unexported-return: exported func (.*), which can be annoying to use" # revive
max-issues-per-linter: 0
max-same-issues: 0