gluster / gluster-csi-driver

DEPRECATED: Gluster Container Storage Interface (CSI) driver
GNU Lesser General Public License v3.0
57 stars 30 forks source link

Reduce complexity of CreateVolume and NodePublishVolume #56

Closed JohnStrunk closed 6 years ago

JohnStrunk commented 6 years ago

Describe the bug CreateVolume and NodePublishVolume have a high complexity according to gocyclo. They should be simplified.

Steps to reproduce Steps to reproduce the behavior:

  1. Run gocyclo on them using gometalinter

Actual results

pkg/glusterfs/controllerserver.go:33::warning: cyclomatic complexity 12 of function (*ControllerServer).CreateVolume() is high (> 10) (gocyclo)
pkg/glusterfs/nodeserver.go:35::warning: cyclomatic complexity 13 of function (*NodeServer).NodePublishVolume() is high (> 10) (gocyclo)

Expected behavior These should not generate errors

Additional context The warnings on these functions have been silenced (via code comments) to permit Travis-ci to pass. Depends on #53

humblec commented 6 years ago

/assign @Madhu-1