mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-09 16:00:22 +00:00
cleanup: address gocritic warnings
Add explanation to nolint directives. Issue reported: whyNoLint: include an explanation for nolint directive (gocritic) Signed-off-by: Yug <yuggupta27@gmail.com>
This commit is contained in:
parent
628ae9e982
commit
48fa43270f
@ -62,7 +62,6 @@ func execCommandErr(ctx context.Context, program string, args ...string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
//nolint: unparam
|
||||
func execCommandJSON(ctx context.Context, v interface{}, program string, args ...string) error {
|
||||
stdout, _, err := execCommand(ctx, program, args...)
|
||||
if err != nil {
|
||||
|
@ -682,7 +682,8 @@ func (cs *ControllerServer) ValidateVolumeCapabilities(ctx context.Context, req
|
||||
|
||||
// CreateSnapshot creates the snapshot in backend and stores metadata
|
||||
// in store
|
||||
// nolint: gocyclo
|
||||
// TODO: make this function less complex
|
||||
// nolint:gocyclo // complexity needs to be reduced.
|
||||
func (cs *ControllerServer) CreateSnapshot(ctx context.Context, req *csi.CreateSnapshotRequest) (*csi.CreateSnapshotResponse, error) {
|
||||
if err := cs.validateSnapshotReq(ctx, req); err != nil {
|
||||
return nil, err
|
||||
|
@ -98,7 +98,8 @@ var (
|
||||
// - Map the image (creates a device)
|
||||
// - Create the staging file/directory under staging path
|
||||
// - Stage the device (mount the device mapped for image)
|
||||
// nolint: gocyclo
|
||||
// TODO: make this function less complex
|
||||
// nolint:gocyclo // complexity needs to be reduced.
|
||||
func (ns *NodeServer) NodeStageVolume(ctx context.Context, req *csi.NodeStageVolumeRequest) (*csi.NodeStageVolumeResponse, error) {
|
||||
if err := util.ValidateNodeStageVolumeRequest(req); err != nil {
|
||||
return nil, err
|
||||
|
@ -32,7 +32,8 @@ func cleanupTestData() {
|
||||
os.RemoveAll(basePath)
|
||||
}
|
||||
|
||||
// nolint: gocyclo
|
||||
// TODO: make this function less complex
|
||||
// nolint:gocyclo // complexity needs to be reduced.
|
||||
func TestCSIConfig(t *testing.T) {
|
||||
var err error
|
||||
var data string
|
||||
|
Loading…
Reference in New Issue
Block a user