-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.golangci.yaml
More file actions
133 lines (111 loc) · 2.66 KB
/
Copy path.golangci.yaml
File metadata and controls
133 lines (111 loc) · 2.66 KB
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# Ref: https://golangci-lint.run/usage/configuration/
version: "2"
linters:
default: all
disable:
- contextcheck # I will revisit that later, with the `slog.Log` wrapper it's difficult.
- depguard # Using go.mod is enough
- exhaustruct # it's ok not to specify all the fields in a struct definition
- godox # I like leaving TODOs in the code
- lll # using revive's line-length-limit
- nonamedreturns # using revive's confusing-results and bare-return
- testpackage # keep the tests close to the code
- varnamelen # short variable names are okay
- funlen # using revive's function-length
- noinlineerr # inline errors are sometimes ok
- wsl # deprecated
settings:
misspell:
mode: default
locale: US
mnd:
ignored-numbers:
# UNIX permissions mask
- "0o700" # rwx------
- "0o600" # rw-------
ignored-functions:
# Functions that require a UNIX permissions mask
- os.WriteFile
- os.OpenFile
- os.MkdirAll
nolintlint:
require-explanation: true
revive:
enable-all-rules: true
rules:
- name: add-constant
disabled: true
- name: context-as-argument
arguments:
- allowTypesBefore: '*testing.T'
- name: comment-spacings
arguments:
- nolint
- name: line-length-limit
arguments:
- 120
- name: unhandled-error
arguments:
- fmt.Printf
- fmt.Println
- fmt.Fprint
- fmt.Fprintf
- fmt.Fprintln
tagliatelle:
case:
rules:
json: snake
yaml: snake
exclusions:
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
rules:
- linters:
- bodyclose
- cyclop
- gocognit
path: _test.go
- linters:
- revive
path: _test
text: line-length-limit
- linters:
- revive
path: _test
text: function-length
- linters:
- revive
path: _test
text: cyclomatic
- linters:
- revive
path: _test
text: cognitive-complexity
- linters:
- revive
text: line-length-limit
source: https?://
paths:
- third_party$
- builtin$
- examples$
formatters:
enable:
- gci
- gofmt
- gofumpt
- goimports
settings:
gci:
sections:
- standard
- default
- localmodule
exclusions:
paths:
- third_party$
- builtin$
- examples$