Skip to content
Open
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/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ jobs:
format: auto
config_file: .yamllint.yaml

- uses: golangci/golangci-lint-action@aaa42aa0628b4ae2578232a66b541047968fac86 # v6.1.0
- uses: golangci/golangci-lint-action@v8
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- uses: golangci/golangci-lint-action@v8
- uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0

with:
args: --verbose
version: v1.57.1
version: v2.3.0

build:
name: Build all linux architectures
Expand Down
46 changes: 28 additions & 18 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,40 @@
version: "2"
linters:
enable:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep the list of used linter visible, only typecheck and maybe ineffassign are not available anymore here. Appart form gofumpt and gci as they are now in formatter section

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i just did golangci-lint migrate and this is exactly what it spit out. I'll take a closer look.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's exactly why I point it 😉. The migrate tool is noisy on that part

- contextcheck
- errcheck
- errorlint
- gci
- ginkgolinter
- gocritic
- gofumpt
- govet
- ineffassign
- misspell
- nolintlint
- nonamedreturns
- predeclared
- staticcheck
- typecheck
- unconvert
- unused
- whitespace

linters-settings:
gci:
sections:
- standard
- default
- prefix(github.com/containernetworking)

run:
timeout: 5m
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
paths:
- third_party$
- builtin$
- examples$
Comment on lines +21 to +24
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this part as there are no path matching those in the project

formatters:
enable:
- gci
- gofumpt
settings:
gci:
sections:
- standard
- default
- prefix(github.com/containernetworking)
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$
Comment on lines +37 to +40
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this part as there are no path matching those in the project

5 changes: 3 additions & 2 deletions cnitool/cmd/root.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2015 CNI authors
// Copyright CNI authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -22,8 +22,9 @@ import (
"path/filepath"
"strings"

"github.com/containernetworking/cni/libcni"
"github.com/spf13/cobra"

"github.com/containernetworking/cni/libcni"
)

// Protocol parameters are passed to the plugins via OS environment variables.
Expand Down
4 changes: 2 additions & 2 deletions pkg/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ var (
)

// VersionsFrom returns a list of versions starting from min, inclusive
func VersionsStartingFrom(min string) PluginInfo {
func VersionsStartingFrom(minimum string) PluginInfo {
out := []string{}
// cheat, just assume ordered
ok := false
for _, v := range All.SupportedVersions() {
if !ok && v == min {
if !ok && v == minimum {
ok = true
}
if ok {
Expand Down
Loading