mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 02:33:34 +00:00
build: address nolintlint
errors from new golangci-lint
Signed-off-by: Niels de Vos <ndevos@ibm.com>
This commit is contained in:
committed by
mergify[bot]
parent
5913ed92fe
commit
81218a69f9
@ -1060,7 +1060,7 @@ func (cs *ControllerServer) ValidateVolumeCapabilities(
|
||||
}
|
||||
|
||||
// CreateSnapshot creates the snapshot in backend and stores metadata in store.
|
||||
// nolint:gocyclo,cyclop // TODO: reduce complexity.
|
||||
//nolint:gocyclo,cyclop // TODO: reduce complexity.
|
||||
func (cs *ControllerServer) CreateSnapshot(
|
||||
ctx context.Context,
|
||||
req *csi.CreateSnapshotRequest,
|
||||
|
@ -78,7 +78,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:gomnd // numbers specify Kernel versions.
|
||||
deepFlattenSupport = []util.KernelVersion{
|
||||
{
|
||||
Version: 5,
|
||||
@ -114,7 +114,7 @@ var (
|
||||
|
||||
// parseBoolOption checks if parameters contain option and parse it. If it is
|
||||
// empty or not set return default.
|
||||
// nolint:unparam // currently defValue is always false, this can change in the future
|
||||
//nolint:unparam // currently defValue is always false, this can change in the future
|
||||
func parseBoolOption(ctx context.Context, parameters map[string]string, optionName string, defValue bool) bool {
|
||||
boolVal := defValue
|
||||
|
||||
|
@ -538,7 +538,7 @@ func undoVolReservation(ctx context.Context, rbdVol *rbdVolume, cr *util.Credent
|
||||
// Generate new volume Handler
|
||||
// The volume handler won't remain same as its contains poolID,clusterID etc
|
||||
// which are not same across clusters.
|
||||
// nolint:gocyclo,cyclop,nestif // TODO: reduce complexity
|
||||
//nolint:gocyclo,cyclop,nestif // TODO: reduce complexity
|
||||
func RegenerateJournal(
|
||||
volumeAttributes map[string]string,
|
||||
claimName,
|
||||
|
@ -1161,7 +1161,7 @@ func generateVolumeFromVolumeID(
|
||||
// GenVolFromVolID generates a rbdVolume structure from the provided identifier, updating
|
||||
// the structure with elements from on-disk image metadata as well.
|
||||
//
|
||||
// nolint // returns non-exported *rbdVolume, which is fine
|
||||
|
||||
func GenVolFromVolID(
|
||||
ctx context.Context,
|
||||
volumeID string,
|
||||
@ -1702,7 +1702,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:gomnd // number specifies version.
|
||||
Pool: volOptions.Pool,
|
||||
RadosNamespace: volOptions.RadosNamespace,
|
||||
ImageName: volOptions.RbdImageName,
|
||||
|
Reference in New Issue
Block a user