forked from pokt-network/pocket
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.yml
63 lines (61 loc) · 1.92 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
linters:
# Full list available at https://golangci-lint.run/usage/linters/#disabled-by-default
enable:
# Default linters
- errcheck
- gosimple
- govet
- ineffassign
- staticcheck
- typecheck
- unused
# Additional linters
- gosec
- misspell
- promlinter
- unparam
- goimports
# Gocritic allows to use ruleguard; custom linting rules
- gocritic
linters-settings:
# Gocritic settings; https://go-critic.com/overview
gocritic:
enabled-tags:
- diagnostic
- experimental
- opinionated # This might be too much, but we can try it out
- performance
- style
disabled-checks:
- dupImport # https://github.com/go-critic/go-critic/issues/845
- ifElseChain
settings:
ruleguard:
# Enable debug to identify which 'Where' condition was rejected.
# The value of the parameter is the name of a function in a ruleguard file.
#
# When a rule is evaluated:
# If:
# The Match() clause is accepted; and
# One of the conditions in the Where() clause is rejected,
# Then:
# ruleguard prints the specific Where() condition that was rejected.
#
# The flag is passed to the ruleguard 'debug-group' argument.
# Default: ""
# debug: "testEq"
# Determines the behavior when an error occurs while parsing ruleguard files.
# If flag is not set, log error and skip rule files that contain an error.
# If flag is set, the value must be a comma-separated list of error conditions.
# - 'all': fail on all errors.
# - 'import': ruleguard rule imports a package that cannot be found.
# - 'dsl': gorule file does not comply with the ruleguard DSL.
# Default: ""
failOn: dsl
rules: "build/linters/*.go"
run:
go: "1.19"
skip-dirs:
- build/linters
build-tags:
- codeanalysis