-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.yaml
172 lines (163 loc) · 3.94 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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
# golangci-lint is a fast linters runner for Go.
#
# Available linters and settings:
# https://golangci-lint.run/usage/linters
linters:
enable:
- bodyclose
- containedctx
- contextcheck
- copyloopvar
# - depguard
- dupl
- errname
- errorlint
- exhaustive
# - exportloopref
- gochecknoinits
- gocognit
- gocritic
- godot
- gofmt
- goimports
- gosimple
- govet
- importas
- ineffassign
- misspell
- nilnil
- noctx
- nolintlint
- nosprintfhostport
- perfsprint
# - prealloc
- predeclared
- reassign
- revive
- sloglint
- staticcheck
# - tagalign
- tenv
- thelper
- typecheck
- unparam
- unused
- usestdlibvars
- unconvert
# - wrapcheck
linters-settings:
goimports:
# Put imports beginning with prefix after 3rd-party packages.
# It's a comma-separated list of prefixes.
# Default: ""
local-prefixes: >-
github.com/act3-ai, gitlab.com/act3-ai
importas:
# if set to `true`, force to use alias.
no-unaliased: true
# List of aliases
alias:
- pkg: github.com/opencontainers/image-spec/specs-go/v1
alias: ocispec
- pkg: github.com/act3-ai/hops/internal/apis/config.hops.io/v1beta1
alias: hopsv1
- pkg: github.com/act3-ai/hops/internal/apis/formulae.brew.sh/v1
alias: brewv1
- pkg: github.com/act3-ai/hops/internal/apis/formulae.brew.sh/v2
alias: brewv2
- pkg: github.com/act3-ai/hops/internal/apis/formulae.brew.sh/v3
alias: brewv3
nilnil:
checked-types:
# - ptr
- func
- iface
- map
- chan
perfsprint:
err-error: true
revive:
ignore-generated-header: true
enable-all-rules: true
rules:
- name: add-constant
disabled: true
- name: atomic
- name: blank-imports
- name: cognitive-complexity
arguments: [30]
- name: confusing-naming
disabled: true
- name: context-as-argument
- name: context-keys-type
- name: cyclomatic
disabled: true
- name: defer
- name: dot-imports
- name: empty-block
- name: error-naming
- name: error-return
- name: error-strings
- name: errorf
- name: exported
- name: function-length
disabled: true
- name: if-return
- name: increment-decrement
- name: indent-error-flow
- name: line-length-limit
disabled: true
- name: max-public-structs
disabled: true
- name: package-comments
- name: range-val-address
disabled: true
- name: range-val-in-closure
disabled: true
- name: range
- name: receiver-naming
- name: redefines-builtin-id
- name: redundant-import-alias
disabled: true
- name: struct-tag
disabled: true
- name: superfluous-else
- name: time-naming
- name: unexported-naming
- name: unexported-return
- name: unhandled-error
arguments:
- "fmt.Printf"
- "fmt.Println"
- "fmt.Print"
- name: unreachable-code
- name: unused-parameter
- name: use-any
- name: useless-break
- name: var-declaration
- name: var-naming
sloglint:
# Enforce using attributes only (overrides no-mixed-args, incompatible with kv-only).
# Default: false
attr-only: true
# Enforce using static values for log messages.
# Default: false
# static-msg: true
# Enforce a single key naming convention.
# Values: snake, kebab, camel, pascal
# Default: ""
key-naming-case: camel
staticcheck:
# SAxxxx checks in https://staticcheck.io/docs/configuration/options/#checks
# Default: ["*"]
checks: ["all"]
unparam:
check-exported: true
issues:
# uncomment to enable more linting
# exclude-use-default: false
include:
- EXC0005
- EXC0012
- EXC0009
- EXC0002