Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ jobs:
cache: false # see actions/setup-go#368

- uses: actions/checkout@v6
- uses: golangci/golangci-lint-action@v6
- uses: golangci/golangci-lint-action@v9
with:
version: v1.61.0
version: v2.6.2
skip-cache: true
args: --timeout=5m

Expand Down
61 changes: 39 additions & 22 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,49 @@
version: "2"
linters:
enable:
- copyloopvar
- gofmt
- goimports
- dupword
- gosec
- ineffassign
- misspell
- nolintlint
- revive
- staticcheck
- tenv # Detects using os.Setenv instead of t.Setenv since Go 1.17
- unconvert
- unused
- govet
- dupword # Checks for duplicate words in the source code
disable:
- errcheck

run:
timeout: 5m

issues:
exclude-dirs:
- api
- cluster
- design
- docs
- docs/man
- releases
- reports
- test # e2e scripts
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
paths:
- api
- cluster
- design
- docs
- docs/man
- releases
- reports
- test
- third_party$
- builtin$
- examples$
formatters:
enable:
- gofmt
- goimports
exclusions:
generated: lax
paths:
- api
- cluster
- design
- docs
- docs/man
- releases
- reports
- test
- third_party$
- builtin$
- examples$
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/containerd/plugin

go 1.20
go 1.22

require github.com/opencontainers/image-spec v1.1.0

Expand Down
4 changes: 2 additions & 2 deletions plugin_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -520,15 +520,15 @@ func testPlugin(t Type, id string, i interface{}, err error) *Plugin {
func BenchmarkGraph(b *testing.B) {
register := testRegistry()
b.ResetTimer()
for i := 0; i < b.N; i++ {
for range b.N {
register.Graph(mockPluginFilter)
}
}

func BenchmarkUnique(b *testing.B) {
register := testRegistry()
b.ResetTimer()
for i := 0; i < b.N; i++ {
for range b.N {
checkUnique(register, &Registration{
Type: InternalPlugin,
ID: "new",
Expand Down
Loading