-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.golangci.yaml
125 lines (124 loc) · 2.83 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
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
linters:
disable-all: true
enable:
- depguard
- revive
- stylecheck
- gosec
- goconst
- gocyclo
- gci
- unparam
- govet
presets:
- bugs
- comment
- complexity
- error
- format
- import
# - metalinter #slow
- module
- performance
# - sql
- style
- test
- unused
linters-settings:
revive:
ignore-generated-header: true
enable-all-rules: false
# Specifying any rule explicitly will disable the default-enabled rules.
# Manually specify the defaults along with `context-as-argument`.
rules:
# https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md
- name: argument-limit
arguments: [4]
- name: bare-return
disabled: false
- name: blank-imports
disabled: false
- name: error-naming
disabled: false
- name: error-return
disabled: false
- name: error-strings
disabled: false
- name: exported
disabled: false
- name: increment-decrement
disabled: false
- name: indent-error-flow
disabled: false
- name: receiver-naming
disabled: false
- name: range
disabled: false
- name: var-naming
disabled: false
stylecheck:
checks: ["all"]
gci:
custom-order: true
sections:
- standard
- default
- prefix(github.com/intility/cwc)
depguard:
rules:
prevent_unmaintained_packages:
list-mode: lax
deny:
- pkg: io/ioutil
desc: "replaced by io and os packages since Go 1.16"
nlreturn:
block-size: 2
forbidigo:
forbid:
- p: ^fmt\.Print.*$
msg: "use ui.PrintMessage"
varnamelen:
ignore-decls:
- w http.ResponseWriter
- r *http.Request
- r chi.Router
exhaustruct:
# List of regular expressions to exclude struct packages and their names from checks.
# Regular expressions must match complete canonical struct package/name/structname.
# These packages typically contains no suitable constructors, but needs to be used with zero values.
# Default: []
exclude:
# std libs
- "^net/http.Client$"
- "^net/http.Cookie$"
- "^net/http.Request$"
- "^net/http.Response$"
- "^net/http.Server$"
- "^net/http.Transport$"
# 3rd party
- ".+/cobra.Command$"
- ".+openai.ChatCompletionRequest"
- ".+openai.ChatCompletionMessage"
run:
tests: false # skip test files
skip-dirs:
- bin
- vendor
- domain/house/mocks
- .codecov.yml
- .coveralls.yml
- .git
- .gitattributes
- .github
- .gitignore
- .gitlab
- .gitmodules
- .golangci
- .golangci.yaml
- .goreleaser
- .goreleaser.d
- .goreleaser.yml
- .idea
- .mockery.yaml
- .travis.yml
- .vscode