-
Notifications
You must be signed in to change notification settings - Fork 0
/
.golangci.yml
114 lines (109 loc) · 4.03 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
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
linters-settings:
govet:
check-shadowing: true
gocyclo:
min-complexity: 30
cyclop:
max-complexity: 30
maligned:
suggest-new: true
dupl:
threshold: 200
goconst:
min-len: 2
min-occurrences: 3
goheader:
# Supports two types 'const` and `regexp`.
# Values can be used recursively.
# Default: {}
values:
const:
# Define here const type values in format k:v.
# For example:
AUTHOR: Enver Bisevac
#regexp:
# Define here regexp type values.
# for example:
# AUTHOR: .*@mycompany\.com
# The template use for checking.
# Default: ""
template: |-
Copyright (c) 2023 {{ AUTHOR }}
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# As alternative of directive 'template', you may put the path to file with the template source.
# Useful if you need to load the template from a specific file.
# Default: ""
# template-path: /path/to/my/template.tmpl
revive:
rules:
- name: exported
arguments:
- disableStutteringCheck
tagliatelle:
# Check the struck tag name case.
case:
# Use the struct field name to check the name of the struct tag.
# Default: false
use-field-name: true
# `camel` is used for `json` and `yaml` (can be overridden)
# Default: {}
rules:
# Any struct tag type can be used.
# Support string case: `camel`, `pascal`, `kebab`, `snake`, `goCamel`, `goPascal`, `goKebab`, `goSnake`, `upper`, `lower`
json: snake
yaml: snake
xml: snake
bson: snake
avro: snake
mapstructure: snake
linters:
enable-all: true
disable:
- golint # deprecated, replaced with revive
- interfacer # deprecated
- maligned # deprecated
- deadcode # deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter. Replaced by unused.
- structcheck # is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter. Replaced by unused.
- varcheck # is deprecated (since v1.49.0) due to: The owner seems to have abandoned the linter. Replaced by unused.
- ifshort # is deprecated (since v1.48.0) due to: The repository of the linter has been deprecated by the owner.
- nosnakecase # deprecated (since v1.48.1) due to: The repository of the linter has been deprecated by the owner. Replaced by revive(var-naming).
- wrapcheck
- nlreturn
- gomnd
- goerr113
- exhaustivestruct
- wsl
- whitespace
- lll
- scopelint
- nestif
- funlen
- paralleltest
- godot
- varnamelen
- ireturn
- gochecknoglobals
- goconst
- exhaustruct
- nonamedreturns
issues:
exclude-rules:
- linters:
- gosec
text: "G[501]"
include:
- EXC0012 # EXC0012 revive: Annoying issue about not having a comment. The rare codebase has such comments
- EXC0014 # EXC0014 revive: Annoying issue about not having a comment. The rare codebase has such comments