-
Notifications
You must be signed in to change notification settings - Fork 7
/
.golangci.yaml
90 lines (79 loc) · 2.64 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
run:
# Include test files or not.
# Default: true
tests: false
# Which dirs to skip: issues from them won't be reported.
# Can use regexp here: `generated.*`, regexp is applied on full path.
# 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:
# - src/external_libs
# - autogenerated_by_my_lib
# Enables skipping of directories:
# - vendor$, third_party$, testdata$, examples$, Godeps$, builtin$
# Default: true
# skip-dirs-use-default: false
# Which files to skip: they will be analyzed, but issues from them won't be reported.
# Default value is empty list,
# but there is no need to include all autogenerated files,
# we confidently recognize autogenerated files.
# If it's not please let us know.
# "/" will be replaced by current OS file path separator to properly work on Windows.
# skip-files:
# - ".*\\.my\\.go$"
# - lib/bad.go
output:
# Format: colored-line-number|line-number|json|tab|checkstyle|code-climate|junit-xml|github-actions
#
# Multiple can be specified by separating them by comma, output can be provided
# for each of them by separating format name and path by colon symbol.
# Output path can be either `stdout`, `stderr` or path to the file to write to.
# Example: "checkstyle:report.json,colored-line-number"
#
# Default: colored-line-number
format: github-actions
linters-settings:
wrapcheck:
ignoreSigs:
# Fiber takes care of unwrapping the error
- func (*github.com/gofiber/fiber/v2.Ctx)
# No point in wrapping these
- func encoding/json.Marshal(v any)
- func encoding/json.UnmarshalJSON(v any)
# Defaults
- .Errorf(
- errors.New(
- errors.Unwrap(
- .Wrap(
- .Wrapf(
- .WithMessage(
- .WithMessagef(
- .WithStack(
funlen:
# Increase the number of lines, considering funlen counts comments as well
# (https://github.com/ultraware/funlen/issues/12)
#
# default: 60
lines: 80
linters:
enable-all: true
disable:
# Disable deprecated linters
- exhaustivestruct
- golint
- interfacer
- maligned
- scopelint
- structcheck
# We don't want to limit dependencies
- depguard
# Not terribly useful and ends up in too much boilerplate
- exhaustruct
# False positives (https://github.com/daixiang0/gci/issues/54)
- gci
# Seems excessive
- tagalign
# Run only fast linters from enabled linters set (first run won't be fast)
# Default: false
# fast: true