mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-25 22:40:21 +00:00
ci: update golangci-lint to v1.62.2
- gomnd is replaced by mnd in v1.58.0 - gosec exlcude G115 rule (Potential integer overflow when converting between integer types) - disable new iface linter - disable new recvcheck linter Signed-off-by: Praveen M <m.praveen@ibm.com>
This commit is contained in:
parent
6acc44c4e6
commit
7d0b8580ea
@ -26,7 +26,7 @@ GO111MODULE=on
|
||||
COMMITLINT_VERSION=latest
|
||||
|
||||
# static checks and linters
|
||||
GOLANGCI_VERSION=v1.57.2
|
||||
GOLANGCI_VERSION=v1.62.2
|
||||
|
||||
# external snapshotter version
|
||||
# Refer: https://github.com/kubernetes-csi/external-snapshotter/releases
|
||||
|
@ -36,7 +36,7 @@ import (
|
||||
"k8s.io/kubernetes/test/e2e/framework"
|
||||
)
|
||||
|
||||
//nolint:gomnd // numbers specify Kernel versions.
|
||||
//nolint:mnd // numbers specify Kernel versions.
|
||||
var nbdResizeSupport = []util.KernelVersion{
|
||||
{
|
||||
Version: 5,
|
||||
@ -48,7 +48,7 @@ var nbdResizeSupport = []util.KernelVersion{
|
||||
}, // standard 5.3+ versions
|
||||
}
|
||||
|
||||
//nolint:gomnd // numbers specify Kernel versions.
|
||||
//nolint:mnd // numbers specify Kernel versions.
|
||||
var fastDiffSupport = []util.KernelVersion{
|
||||
{
|
||||
Version: 5,
|
||||
@ -60,7 +60,7 @@ var fastDiffSupport = []util.KernelVersion{
|
||||
}, // standard 5.3+ versions
|
||||
}
|
||||
|
||||
//nolint:gomnd // numbers specify Kernel versions.
|
||||
//nolint:mnd // numbers specify Kernel versions.
|
||||
var deepFlattenSupport = []util.KernelVersion{
|
||||
{
|
||||
Version: 5,
|
||||
@ -75,7 +75,7 @@ var deepFlattenSupport = []util.KernelVersion{
|
||||
// To use `io-timeout=0` we need
|
||||
// www.mail-archive.com/linux-block@vger.kernel.org/msg38060.html
|
||||
//
|
||||
//nolint:gomnd // numbers specify Kernel versions.
|
||||
//nolint:mnd // numbers specify Kernel versions.
|
||||
var nbdZeroIOtimeoutSupport = []util.KernelVersion{
|
||||
{
|
||||
Version: 5,
|
||||
|
@ -31,7 +31,7 @@ import (
|
||||
var (
|
||||
availableMounters []string
|
||||
|
||||
//nolint:gomnd // numbers specify Kernel versions.
|
||||
//nolint:mnd // numbers specify Kernel versions.
|
||||
quotaSupport = []util.KernelVersion{
|
||||
{
|
||||
Version: 4,
|
||||
|
@ -76,7 +76,7 @@ var (
|
||||
kernelRelease = ""
|
||||
// deepFlattenSupport holds the list of kernel which support mapping rbd
|
||||
// image with deep-flatten image feature
|
||||
//nolint:gomnd // numbers specify Kernel versions.
|
||||
//nolint:mnd // numbers specify Kernel versions.
|
||||
deepFlattenSupport = []util.KernelVersion{
|
||||
{
|
||||
Version: 5,
|
||||
|
@ -1793,7 +1793,7 @@ func (ri *rbdImageMetadataStash) String() string {
|
||||
func stashRBDImageMetadata(volOptions *rbdVolume, metaDataPath string) error {
|
||||
imgMeta := rbdImageMetadataStash{
|
||||
// there are no checks for this at present
|
||||
Version: 3, //nolint:gomnd // number specifies version.
|
||||
Version: 3, //nolint:mnd // number specifies version.
|
||||
Pool: volOptions.Pool,
|
||||
RadosNamespace: volOptions.RadosNamespace,
|
||||
ImageName: volOptions.RbdImageName,
|
||||
|
@ -128,6 +128,10 @@ linters-settings:
|
||||
- dupImport # https://github.com/go-critic/go-critic/issues/845
|
||||
# TODO: uncheckedInlineErr gives many false-positives
|
||||
- uncheckedInlineErr
|
||||
gosec:
|
||||
excludes:
|
||||
# TODO: G115 gives many false-positives
|
||||
- G115 # Potential integer overflow when converting between integer types
|
||||
unused:
|
||||
# treat code as a program (not a library) and report unused exported
|
||||
# identifiers; default is false.
|
||||
@ -197,6 +201,7 @@ linters:
|
||||
- wrapcheck
|
||||
# TODO: enable linters added in golangci-lint 1.43
|
||||
- contextcheck
|
||||
- mnd
|
||||
- gomnd
|
||||
- ireturn
|
||||
- tagliatelle
|
||||
@ -208,3 +213,6 @@ linters:
|
||||
- containedctx
|
||||
# TODO: depguard requires a list of (un)acceptable imports
|
||||
- depguard
|
||||
# TODO enable linters added in golangci-lint 1.60
|
||||
- iface
|
||||
- recvcheck
|
||||
|
Loading…
Reference in New Issue
Block a user