-
Notifications
You must be signed in to change notification settings - Fork 5
/
.golangci.yaml
109 lines (106 loc) · 3.01 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
# Options for analysis running.
run:
# Which dirs to skip: issues from them won't be reported.
# Can use regexp here: `generated.*`, regexp is applied on full path,
# including the path prefix if one is set.
# Default value is empty list,
# but default dirs are skipped independently of this option's value (see skip-dirs-use-default).
# "/" will be replaced by current OS file path separator to properly work on Windows.
skip-dirs:
- vendor
- gen
linters:
enable-all: true
# Disable specific linter
# https://golangci-lint.run/usage/linters/#disabled-by-default
disable:
- dupl
- lll
- interfacer
- exhaustivestruct
- nosnakecase
- scopelint
- ifshort
- golint
- deadcode
- varcheck
- structcheck
- maligned
- wrapcheck
- varnamelen
- funlen
- gomoddirectives
- gocognit
- testpackage
- paralleltest
- nestif
- cyclop
- maintidx
- gomnd
- gochecknoglobals
- gocritic
- godox
- forbidigo
- exhaustruct
- contextcheck
- ireturn
- goerr113
- depguard
linters-settings:
exhaustive:
# Program elements to check for exhaustiveness.
# Default: [ switch ]
check:
- switch
- map
godot:
# Comments to be checked: `declarations`, `toplevel`, or `all`.
# Default: declarations
scope: declarations
# Check that each sentence starts with a capital letter.
# Default: false
capital: true
misspell:
# Correct spellings using locale preferences for US or UK.
# Setting locale to US will correct the British spelling of 'colour' to 'color'.
# Default is to use a neutral variety of English.
locale: US
nolintlint:
# Enable to require an explanation of nonzero length after each nolint directive.
# Default: false
require-explanation: true
# Enable to require nolint directives to mention the specific linter being suppressed.
# Default: false
require-specific: true
predeclared:
# Include method names and field names (i.e., qualified names) in checks.
# Default: false
q: true
tagliatelle:
# Check the struct 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`, and `header` is used for `header` (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`, `header`
json: camel
yaml: camel
xml: camel
bson: camel
avro: snake
mapstructure: kebab
gci:
# Skip generated files.
# Default: true
skip-generated: true
gofumpt:
# Module path which contains the source code being formatted.
# Default: ""
module-path: github.com/coinbase/staking-client-library-go
# Choose whether to use the extra rules.
# Default: false
extra-rules: true