Preparing report...

Report for github.com/libopenstorage/stork

A+    Excellent!    Found 32 issues across 263 files

Tweet

gofmt100%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command

No problems detected. Good job!


go_vet100%

go vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string.

No problems detected. Good job!


gocyclo88%

Gocyclo calculates cyclomatic complexities of functions in Go source code. The cyclomatic complexity of a function is calculated according to the following rules: 1 is the base complexity of a function +1 for each 'if', 'for', 'case', '&&' or '||' Go Report Card warns on functions with cyclomatic complexity > 15.

    • stork/drivers/volume/csi/csi.go
    • Line 593: warning: cyclomatic complexity 28 of function (*csi).GetBackupStatus() is high (> 15) (gocyclo)
    • Line 1394: warning: cyclomatic complexity 21 of function (*csi).GetRestoreStatus() is high (> 15) (gocyclo)
    • stork/pkg/applicationmanager/controllers/applicationbackup.go
    • Line 462: warning: cyclomatic complexity 56 of function (*ApplicationBackupController).backupVolumes() is high (> 15) (gocyclo)
    • Line 213: warning: cyclomatic complexity 31 of function (*ApplicationBackupController).handle() is high (> 15) (gocyclo)
    • Line 988: warning: cyclomatic complexity 29 of function (*ApplicationBackupController).backupResources() is high (> 15) (gocyclo)
    • Line 1177: warning: cyclomatic complexity 19 of function (*ApplicationBackupController).deleteBackup() is high (> 15) (gocyclo)
    • Line 751: warning: cyclomatic complexity 16 of function (*ApplicationBackupController).runPreExecRule() is high (> 15) (gocyclo)
    • stork/pkg/applicationmanager/controllers/applicationrestore.go
    • Line 331: warning: cyclomatic complexity 45 of function (*ApplicationRestoreController).restoreVolumes() is high (> 15) (gocyclo)
    • Line 617: warning: cyclomatic complexity 21 of function (*ApplicationRestoreController).downloadCRD() is high (> 15) (gocyclo)
    • Line 913: warning: cyclomatic complexity 20 of function (*ApplicationRestoreController).applyResources() is high (> 15) (gocyclo)
    • stork/pkg/applicationmanager/controllers/applicationclone.go
    • Line 186: warning: cyclomatic complexity 21 of function (*ApplicationCloneController).handle() is high (> 15) (gocyclo)
    • Line 341: warning: cyclomatic complexity 20 of function (*ApplicationCloneController).cloneVolumes() is high (> 15) (gocyclo)
    • Line 639: warning: cyclomatic complexity 16 of function (*ApplicationCloneController).applyResources() is high (> 15) (gocyclo)
    • stork/pkg/rule/rule.go
    • Line 306: warning: cyclomatic complexity 19 of function executeCommandAction() is high (> 15) (gocyclo)
    • Line 219: warning: cyclomatic complexity 16 of function ExecuteRule() is high (> 15) (gocyclo)
    • stork/pkg/extender/extender.go
    • Line 143: warning: cyclomatic complexity 37 of function (*Extender).processFilterRequest() is high (> 15) (gocyclo)
    • Line 434: warning: cyclomatic complexity 26 of function (*Extender).processPrioritizeRequest() is high (> 15) (gocyclo)
    • Line 298: warning: cyclomatic complexity 19 of function (*Extender).collectExtenderMetrics() is high (> 15) (gocyclo)
    • Line 383: warning: cyclomatic complexity 17 of function (*Extender).getNodeScore() is high (> 15) (gocyclo)
    • stork/drivers/volume/gcp/gcp.go
    • Line 478: warning: cyclomatic complexity 17 of function (*gcp).GetRestoreStatus() is high (> 15) (gocyclo)
    • Line 152: warning: cyclomatic complexity 17 of function (*gcp).StartBackup() is high (> 15) (gocyclo)
    • stork/drivers/volume/portworx/portworx.go
    • Line 899: warning: cyclomatic complexity 31 of function (*portworx).SnapshotCreate() is high (> 15) (gocyclo)
    • Line 1585: warning: cyclomatic complexity 25 of function (*portworx).SnapshotRestore() is high (> 15) (gocyclo)
    • Line 2763: warning: cyclomatic complexity 21 of function (*portworx).StartBackup() is high (> 15) (gocyclo)
    • Line 1218: warning: cyclomatic complexity 20 of function (*portworx).StartVolumeSnapshotRestore() is high (> 15) (gocyclo)
    • Line 1727: warning: cyclomatic complexity 19 of function (*portworx).DescribeSnapshot() is high (> 15) (gocyclo)
    • Line 2478: warning: cyclomatic complexity 17 of function (*portworx).GetClusterDomains() is high (> 15) (gocyclo)
    • Line 2285: warning: cyclomatic complexity 16 of function (*portworx).GetMigrationStatus() is high (> 15) (gocyclo)
    • Line 2197: warning: cyclomatic complexity 16 of function (*portworx).StartMigration() is high (> 15) (gocyclo)
    • stork/cmd/stork/stork.go
    • Line 300: warning: cyclomatic complexity 30 of function runStork() is high (> 15) (gocyclo)
    • Line 169: warning: cyclomatic complexity 21 of function run() is high (> 15) (gocyclo)
    • stork/pkg/resourcecollector/resourcecollector.go
    • Line 276: warning: cyclomatic complexity 25 of function (*ResourceCollector).GetResources() is high (> 15) (gocyclo)
    • Line 536: warning: cyclomatic complexity 22 of function (*ResourceCollector).prepareResourcesForCollection() is high (> 15) (gocyclo)
    • Line 186: warning: cyclomatic complexity 18 of function (*ResourceCollector).GetResourcesForType() is high (> 15) (gocyclo)
    • Line 414: warning: cyclomatic complexity 18 of function (*ResourceCollector).objectToBeCollected() is high (> 15) (gocyclo)
    • stork/pkg/migration/controllers/migration.go
    • Line 1148: warning: cyclomatic complexity 59 of function (*MigrationController).applyResources() is high (> 15) (gocyclo)
    • Line 183: warning: cyclomatic complexity 33 of function (*MigrationController).handle() is high (> 15) (gocyclo)
    • Line 513: warning: cyclomatic complexity 29 of function (*MigrationController).migrateVolumes() is high (> 15) (gocyclo)
    • Line 734: warning: cyclomatic complexity 22 of function (*MigrationController).migrateResources() is high (> 15) (gocyclo)
    • Line 857: warning: cyclomatic complexity 16 of function (*MigrationController).prepareResources() is high (> 15) (gocyclo)

golint100%

Golint is a linter for Go source code.

No problems detected. Good job!


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell96%

Misspell Finds commonly misspelled English words