-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.golangci.yml
More file actions
79 lines (69 loc) · 1.74 KB
/
.golangci.yml
File metadata and controls
79 lines (69 loc) · 1.74 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
version: "2"
linters:
default: standard
# Enable specific linter.
enable:
- contextcheck
- err113
- errcheck
- errname
- errorlint
- funcorder
- gocognit
- goconst
- gocritic
- godox
- gosec
- iface
- ireturn
- misspell
- nestif
- noctx
- unparam
- unconvert
- prealloc
- revive
- wsl_v5
settings:
wsl_v5:
case-max-lines: 3
default: all
# 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: strict
# Excluding configuration per-path, per-linter, per-text and per-source.
rules:
# Exclude some linters from running on tests files.
- path: _test\.go
linters:
- err113
- gocognit
- goconst
- gocritic
- prealloc
- revive
formatters:
# Enable specific formatter.
# Default: [] (uses standard Go formatting)
enable:
- gofumpt
# Formatters settings.
settings:
gofumpt:
extra-rules: true
issues:
fix: true
run:
timeout: 10m
severity:
default: error