-
Notifications
You must be signed in to change notification settings - Fork 6
/
.golangci.yaml
43 lines (40 loc) · 1.1 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
# golangci-lint configuration used for CI
run:
tests: true
timeout: 10m
skip-files:
- ".*\\.pb\\.go"
skip-dirs-use-default: true
# all available settings of specific linters
linters-settings:
goimports:
local-prefixes: github.com/volcengine/cello
goheader:
template-path: ./copyright.txt
issues:
# Excluding configuration per-path, per-linter, per-text and per-source
exclude-rules:
- linters: [ staticcheck ]
text: "SA1019" # this is rule for deprecated method
- linters: [ staticcheck ]
text: "SA9003: empty branch"
- linters: [ staticcheck ]
text: "SA2001: empty critical section"
- linters: [ goerr113 ]
text: "do not define dynamic errors, use wrapped static errors instead" # This rule to avoid opinionated check fmt.Errorf("text")
# Skip goimports check on generated files
- path: \\.(generated\\.deepcopy|pb)\\.go$
linters:
- goimports
linters:
disable-all: true
enable:
- goerr113
- gofmt
- goimports
- govet
- ineffassign
- misspell
- staticcheck
- unused
- goheader