-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.yaml
61 lines (50 loc) · 1.7 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Docs: https://golangci-lint.run/usage/configuration/#config-file
run:
go: "1.21"
timeout: 30m
linters:
enable:
# Default linters: https://golangci-lint.run/usage/linters#enabled-by-default
- gocritic # https://golangci-lint.run/usage/linters/#gocritic
- gofmt # https://golangci-lint.run/usage/linters/#gofmt
- goimports # https://golangci-lint.run/usage/linters/#goimports
- makezero # https://golangci-lint.run/usage/linters/#makezero
- misspell # https://golangci-lint.run/usage/linters/#misspell
- revive # https://golangci-lint.run/usage/linters/#revive
- stylecheck # https://golangci-lint.run/usage/linters/#stylecheck
- testifylint # https://golangci-lint.run/usage/linters/#testifylint
- unparam # https://golangci-lint.run/usage/linters/#unparam
- usestdlibvars # https://golangci-lint.run/usage/linters/#usestdlibvars
linters-settings:
gocritic:
enable-all: true
disabled-checks:
- commentedOutCode
- hugeParam # TODO Reenable this?
- rangeValCopy
- whyNoLint
revive:
enable-all-rules: true
rules:
- name: add-constant
disabled: true
- name: cognitive-complexity
disabled: true
- name: empty-lines
disabled: true
- name: line-length-limit
arguments: [120]
- name: max-public-structs
disabled: true
- name: unhandled-error
arguments:
- fmt.Printf
- fmt.Println
- name: var-naming
arguments:
- ["ID", "IDS", "JSON", "URL"] # Allow List
- [] # Deny List
stylecheck:
checks: ["all", "-ST1003"] # ST1003 is a duplicate check of var-naming from revive
unparam:
check-exported: true