forked from form3tech-oss/f1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.golangci.yml
94 lines (89 loc) · 2.16 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
# Using [email protected]
run:
timeout: 5m
tests: true
output:
print-linter-name: true
linters:
enable-all: true
fast: false
disable:
# Deprecated (see https://golangci-lint.run/usage/linters/)
- execinquery
- gomnd
- exportloopref
# Annoying style guides that are very subjective
- funlen
- nlreturn
- wsl
- cyclop
- varnamelen
- maintidx
- gocognit
- godot
- gocyclo
- nestif
- nilnil
# Project is not large enough to need duplicate code detection
- dupl
# TODO
- mnd
- err113
linters-settings:
tagliatelle:
case:
rules:
json: snake
yaml: kebab
depguard:
rules:
main:
deny:
- pkg: "github.com/pkg/errors"
desc: "Please use go built-in error wrapping and handling via `fmt` and `errors` packages"
- pkg: "github.com/giantswarm/retry-go"
desc: "Please use https://github.com/avast/retry-go/v4"
gci:
sections:
- standard
- default
- prefix(github.com/form3tech-oss/f1)
exhaustruct:
include:
- github.com/form3tech-oss/f1/v2/internal/run/views.*
nolintlint:
allow-unused: false
require-explanation: true
require-specific: true
issues:
exclude-dirs:
- vendor$
max-issues-per-linter: 0
max-same-issues: 0
exclude-rules:
# Allow use of deprecated API
- path: \.go
linters:
- staticcheck
text: "SA1019: (.*.Logger|testing.WithLogrusLogger)"
- path: _test\.go
linters:
# unwrapped errors are ok in tests
- wrapcheck
# this is ok for BDD style tests
- unparam
# long lines are OK in tests
- lll
# prefer duplicated literal asserts
- dupword
- path: _test\.go
# ST1003: Poorly chosen identifiers (https://staticcheck.io/docs/checks/#ST1003)
# This is to allow identifiers to be snake_cased in favor of BDD integration tests
text: "ST1003"
linters:
- stylecheck
- path: _test\.go
# This is to allow identifiers to be snake_cased in favor of BDD integration tests
text: "var-naming: don't use underscores in Go names;"
linters:
- revive