forked from pachyderm/pachyderm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.golangci.yml
75 lines (75 loc) · 2.13 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
run:
timeout: 5m
skip-dirs:
- cached-deps
build-tags:
- k8s
- unit_test
linters:
enable:
- wrapcheck
- nolintlint
- gofmt
- govet
- gosimple
- errcheck
- ineffassign
- unused
- asciicheck
- asasalint
- bidichk
- exhaustive
- goprintffuncname
- depguard
# - bodyclose CORE-1317
# - gocritic CORE-1318
# - gosec CORE-1319
linters-settings:
errcheck:
exclude-functions:
- (*database/sql.Tx).Rollback
- (*github.com/spf13/cobra.Command).MarkFlagCustom
- (*github.com/spf13/cobra.Command).Usage
nolintlint:
allow-unused: false
allow-leading-space: false
require-explanation: false
require-specific: true
wrapcheck:
ignoreSigs:
- github.com/pachyderm/pachyderm/v2/src/internal/errors.Errorf
- github.com/pachyderm/pachyderm/v2/src/internal/errors.New
- github.com/pachyderm/pachyderm/v2/src/internal/errors.Unwrap
- github.com/pachyderm/pachyderm/v2/src/internal/errors.EnsureStack
- google.golang.org/grpc/status.Error
- google.golang.org/grpc/status.Errorf
- .Wrap(
- .Wrapf(
- .WithMessage(
- .WithMessagef(
- .WithStack(
ignorePackageGlobs:
# These are packages whose return values don't have to be wrapped, not packages where the
# linter isn't used.
- github.com/pachyderm/pachyderm/v2/src/*
ignoreInterfaceRegexps:
- ^fileset\.
- ^collection\.
- ^track\.
gofmt:
simplify: true
exhaustive:
default-signifies-exhaustive: true
# Right now, we only allow opting into the exhaustive check due to a lot of code that makes
# correct use of non-exhaustive switch statements.
# Annotate your switch statement with //exhaustive:enforce to opt in.
explicit-exhaustive-switch: true
explicit-exhaustive-map: true
depguard:
include-go-root: true
packages-with-error-message:
- github.com/sirupsen/logrus: 'use the internal/log package'
- log: 'use the internal/log package'
ignore-file-rules:
- "**/src/internal/log/*.go"
- "**/etc/**/*.go" # /etc cannot import internal/log :(