forked from k8snetworkplumbingwg/dra-driver-sriov
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.golangci.yml
More file actions
97 lines (92 loc) · 2.04 KB
/
.golangci.yml
File metadata and controls
97 lines (92 loc) · 2.04 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
# Tested with golangci-lint ver. 2.x
version: "2"
run:
timeout: 15m
tests: false
linters:
default: none
enable:
- asciicheck # checks for non-ASCII identifiers
- bidichk # checks for dangerous unicode sequences (security)
- bodyclose
- copyloopvar
- depguard
- dogsled
- errcheck
- errname # checks error naming conventions
- exhaustive
- gocheckcompilerdirectives # validates go compiler directives
- gochecknoinits
- goconst
- gocritic
- gomodguard
- goprintffuncname
- gosec
- govet
- ineffassign
- makezero # finds slice declarations with non-zero initial length
- misspell
- reassign # checks package variable reassignment
- staticcheck
- unconvert
- unparam
- unused
- whitespace
settings:
depguard:
rules:
main:
deny:
- pkg: github.com/sirupsen/logrus
desc: "logging is allowed only by logutils.Log"
goconst:
min-len: 2
min-occurrences: 2
misspell:
locale: US
gosec:
excludes:
- G301 # Expect directory permissions to be 0750 or less
- G304 # Potential file inclusion via variable
staticcheck:
checks:
- all
- -QF1001
- -QF1003
- -QF1008
- -ST1000
- -ST1020
- -ST1021
dot-import-whitelist:
- github.com/onsi/ginkgo/v2
- github.com/onsi/gomega
- github.com/onsi/gomega/gstruct
exclusions:
generated: lax
presets:
- comments
- std-error-handling
paths:
- vendor/
- .cache/
- .config/
rules:
- path: ".*_mock.go"
linters:
- all
- path: "zz_generated.*.go"
linters:
- all
- path: _test\.go
linters:
- gosec
- dupl
- goconst
formatters:
enable:
- gofmt
- goimports
settings:
goimports:
local-prefixes:
- github.com/k8snetworkplumbingwg/dra-driver-sriov