generated from xplorfin/go-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.golangci.yml
75 lines (64 loc) · 1.46 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
# see: https://golangci-lint.run/usage/configuration/ for config info
run:
# default concurrency is a available CPU number
concurrency: 8
# include test files or not, default is true
tests: true
# timeout for analysis; set high due to the default
# 1m timeout sometimes causing failures in CI
timeout: 10m
skip-dirs-use-default: true
output:
sort-results: true
linters:
disable-all: true
enable:
- gofmt
- govet
- gosimple
- unconvert
- goimports
- ineffassign
- structcheck
- bodyclose
- whitespace
- nolintlint
fast: false
linters-settings:
gofmt:
# simplify code: gofmt with `-s` option, true by default
simplify: true
govet:
check-shadowing: true
enable:
- assign
- errorsas
- tests
- unreachable
whitespace:
multi-if: true
multi-func: true
nolintlint:
allow-leading-space: false
allow-unused: false
require-explanation: true # this should _probably_ be true, but like... we're all lazy sometimes
require-specific: true
issues:
fix: true
exclude-rules:
# Exclude some linters from running on tests files.
- path: _test\.go
linters:
- gosimple
- gofmt
- goimports
- govet
- path: graph/generated/generated\.go
linters:
- nolintlint
- path: graph/generated/models_gen\.go
linters:
- nolintlint
- path: graph/\.resolvers\.go
linters:
- nolintlint