-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.golangci.yml
More file actions
120 lines (110 loc) · 3.13 KB
/
.golangci.yml
File metadata and controls
120 lines (110 loc) · 3.13 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
version: "2"
linters:
default: all
disable:
- err113
- lll
- gomoddirectives
- depguard
- wrapcheck
- varnamelen
- exhaustive
- exhaustruct
- ireturn
- gochecknoglobals
- nilnil
- mnd
- tagliatelle
- recvcheck
- funcorder
- tagalign
- wsl
- noinlineerr
- noctx
- modernize
settings:
nestif:
# Minimal complexity of if statements to report.
# Default: 5
min-complexity: 15
gocritic:
disabled-checks:
- appendAssign
gocyclo:
min-complexity: 40
cyclop:
max-complexity: 30
revive:
# Maximum number of open files at the same time.
max-open-files: 2048
severity: error
rules:
- name: var-naming
disabled: true
- name: exported
disabled: true
gosec:
excludes:
- G115
- G301
- G304
- G306
- G404
funlen:
lines: 200
statements: 90
gocognit:
min-complexity: 60
# Defines a set of rules to ignore issues.
# It does not skip the analysis, and so does not ignore "typecheck" errors.
exclusions:
# Mode of the generated files analysis.
#
# - `strict`: sources are excluded by strictly following the Go generated file convention.
# Source files that have lines matching only the following regular expression will be excluded: `^// Code generated .* DO NOT EDIT\.$`
# This line must appear before the first non-comment, non-blank text in the file.
# https://go.dev/s/generatedcode
# - `lax`: sources are excluded if they contain lines like `autogenerated file`, `code generated`, `do not edit`, etc.
# - `disable`: disable the generated files exclusion.
#
# Default: lax
generated: strict
# Log a warning if an exclusion rule is unused.
warn-unused: false
rules:
- path: ndc-http-schema
linters:
- goconst
- path: ndc-http-schema/openapi
linters:
- dupl
# Which file paths to exclude: they will be analyzed, but issues from them won't be reported.
# "/" will be replaced by the current OS file path separator to properly work on Windows.
paths:
- ".*_test\\.go$"
formatters:
# Enable specific formatter.
# Default: [] (uses standard Go formatting)
enable:
- gci
- gofmt
- gofumpt
- goimports
- golines
# Formatters settings.
settings: {}
exclusions:
# Mode of the generated files analysis.
#
# - `strict`: sources are excluded by strictly following the Go generated file convention.
# Source files that have lines matching only the following regular expression will be excluded: `^// Code generated .* DO NOT EDIT\.$`
# This line must appear before the first non-comment, non-blank text in the file.
# https://go.dev/s/generatedcode
# - `lax`: sources are excluded if they contain lines like `autogenerated file`, `code generated`, `do not edit`, etc.
# - `disable`: disable the generated files exclusion.
#
# Default: lax
generated: strict
# Which file paths to exclude.
# Default: []
paths: []