Skip to content

Commit 2e72b41

Browse files
committed
golangci-lint: convert configuration to v2
typecheck is no longer a linter; it cannot be disabled and is part of the linting process by default. See https://golangci-lint.run/product/migration-guide/#typecheck. Signed-off-by: Timo Beckers <[email protected]>
1 parent f6a5ebd commit 2e72b41

File tree

1 file changed

+22
-23
lines changed

1 file changed

+22
-23
lines changed

.golangci.yaml

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,30 @@
1-
---
1+
version: "2"
22
linters:
3-
disable-all: true
3+
default: none
44
enable:
5-
- goimports
6-
- gosimple
5+
- depguard
76
- govet
87
- ineffassign
98
- misspell
109
- staticcheck
11-
- typecheck
1210
- unused
11+
settings:
12+
depguard:
13+
rules:
14+
no-x-sys-unix:
15+
files:
16+
- '!**/internal/unix/*.go'
17+
- '!**/examples/**/*.go'
18+
- '!**/docs/**/*.go'
19+
deny:
20+
- pkg: golang.org/x/sys/unix
21+
desc: use internal/unix instead
22+
23+
formatters:
24+
enable:
1325
- gofmt
14-
- depguard
15-
linters-settings:
16-
goimports:
17-
# A comma-separated list of prefixes, which, if set, checks import paths
18-
# with the given prefixes are grouped after 3rd-party packages.
19-
# Default: ""
20-
local-prefixes: github.com/cilium/ebpf
21-
depguard:
22-
rules:
23-
no-x-sys-unix:
24-
files:
25-
# Filenames are matched against absolute paths, include **/ at the start.
26-
- '!**/internal/unix/*.go'
27-
- '!**/examples/**/*.go'
28-
- '!**/docs/**/*.go'
29-
deny:
30-
- pkg: golang.org/x/sys/unix
31-
desc: use internal/unix instead
26+
- goimports
27+
settings:
28+
goimports:
29+
local-prefixes:
30+
- github.com/cilium/ebpf

0 commit comments

Comments
 (0)