-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.golangci.yml
74 lines (71 loc) · 1.93 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
# https://github.com/golangci/golangci-lint/blob/master/.golangci.reference.yml
linters:
# Enable all available linters.
# Default: false
# enable-all: true
# Disable specific linter
# https://golangci-lint.run/usage/linters/#disabled-by-default
disable:
- varnamelen # doesn't like one-letter var names
- exhaustive # requires way too many switch...case statements
- gci # couldn't get it working
- exhaustivestruct
- exhaustruct
- gomnd # i like the concept but it comes up in too many places (magic numbers)
- funlen
- wrapcheck
- mnd # magic numbers
- err113 # wrapped error functions (TODO: eventually re-enable this)
- intrange # only works in go 1.22 and later; I don't want to break earlier versions
# - deadcode
# - golint
# - ifshort
# - interfacer
# - maligned
# - nosnakecase
# - scopelint
# - structcheck
# - varcheck
# # Enable presets.
# # https://golangci-lint.run/usage/linters
# # Default: []
presets:
- bugs
- comment
- complexity
- error
- format
- import
- metalinter
- module
- performance
- sql
- style
- test
- unused
linters-settings:
depguard:
rules:
# https://github.com/OpenPeeDeeP/depguard
Main:
files:
- "$all"
- "!$test"
listMode: "strict"
# doesn't seem to work with the current go module name?
# allow:
# - "$gostd"
# - "constants"
# - "github.com/google/uuid"
# - "github.com/teambition/rrule-go"
# - "finance-planner-tui/constants"
deny:
- pkg: io/ioutil
desc: "replaced by io and os packages since Go 1.16: https://tip.golang.org/doc/go1.16#ioutil"
Test:
files:
- "$test"
listMode: "lax"
deny:
- pkg: "github.com/stretchr/testify"
desc: "Please use standard library for tests"