diff --git a/internal/cri/resourcequantity/quantity.go b/internal/cri/resourcequantity/quantity.go index 2104a265e8..f11e449bd0 100644 --- a/internal/cri/resourcequantity/quantity.go +++ b/internal/cri/resourcequantity/quantity.go @@ -363,6 +363,7 @@ func ParseQuantity(str string) (Quantity, error) { } // So that no one but us has to think about suffixes, remove it. + //nolint:staticcheck if base == 10 { amount.SetScale(amount.Scale() + Scale(exponent).infScale()) } else if base == 2 { diff --git a/internal/userns/idmap.go b/internal/userns/idmap.go index 71d3bd89d5..aa8912f10b 100644 --- a/internal/userns/idmap.go +++ b/internal/userns/idmap.go @@ -35,7 +35,7 @@ var invalidUser = User{Uid: invalidID, Gid: invalidID} // User is a Uid and Gid pair of a user // -//nolint:revive +//nolint:revive,staticcheck type User struct { Uid uint32 Gid uint32 @@ -43,7 +43,7 @@ type User struct { // IDMap contains the mappings of Uids and Gids. // -//nolint:revive +//nolint:revive,staticcheck type IDMap struct { UidMap []specs.LinuxIDMapping `json:"UidMap"` GidMap []specs.LinuxIDMapping `json:"GidMap"` diff --git a/pkg/os/os_windows.go b/pkg/os/os_windows.go index 6047e2f59e..ef77d514c4 100644 --- a/pkg/os/os_windows.go +++ b/pkg/os/os_windows.go @@ -60,7 +60,7 @@ func openPath(path string) (windows.Handle, error) { // GetFinalPathNameByHandle flags. // -//nolint:revive // SNAKE_CASE is not idiomatic in Go, but aligned with Win32 API. +//nolint:revive,staticcheck // SNAKE_CASE is not idiomatic in Go, but aligned with Win32 API. const ( cFILE_NAME_OPENED = 0x8 diff --git a/plugins/snapshots/erofs/erofs_linux.go b/plugins/snapshots/erofs/erofs_linux.go index 621731af1f..5e254df7a3 100644 --- a/plugins/snapshots/erofs/erofs_linux.go +++ b/plugins/snapshots/erofs/erofs_linux.go @@ -371,7 +371,7 @@ func (s *snapshotter) View(ctx context.Context, key, parent string, opts ...snap } func setImmutable(path string, enable bool) error { - //nolint:revive // silence "don't use ALL_CAPS in Go names; use CamelCase" + //nolint:revive,staticcheck // silence "don't use ALL_CAPS in Go names; use CamelCase" const ( FS_IMMUTABLE_FL = 0x10 )