Preparing report...

Report for github.com/ystia/yorc

A+    Excellent!    Found 117 issues across 491 files

Tweet

gofmt94%

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


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.

    • yorc/commands/bootstrap/inputs.go
    • Line 374: warning: cyclomatic complexity 83 of function initializeInputs() is high (> 15) (gocyclo)
    • Line 824: warning: cyclomatic complexity 21 of function getCAConfiguration() is high (> 15) (gocyclo)
    • Line 1087: warning: cyclomatic complexity 19 of function getHostsInputs() is high (> 15) (gocyclo)
    • Line 253: warning: cyclomatic complexity 18 of function setBootstrapExtraParams() is high (> 15) (gocyclo)
    • yorc/prov/ansible/execution_test.go
    • Line 154: warning: cyclomatic complexity 28 of function testExecutionResolveInputsOnNode() is high (> 15) (gocyclo)
    • Line 341: warning: cyclomatic complexity 18 of function testExecutionResolveInputsOnRelationshipSource() is high (> 15) (gocyclo)
    • Line 495: warning: cyclomatic complexity 16 of function testExecutionResolveInputOnRelationshipTarget() is high (> 15) (gocyclo)
    • yorc/tasks/workflow/step.go
    • Line 244: warning: cyclomatic complexity 27 of function (*step).runActivity() is high (> 15) (gocyclo)
    • Line 100: warning: cyclomatic complexity 18 of function (*step).isRunnable() is high (> 15) (gocyclo)
    • Line 159: warning: cyclomatic complexity 16 of function (*step).run() is high (> 15) (gocyclo)
    • yorc/storage/store/test.go
    • Line 332: warning: cyclomatic complexity 19 of function CommonStoreTestAllTypes() is high (> 15) (gocyclo)
    • Line 112: warning: cyclomatic complexity 18 of function CommonStoreTest() is high (> 15) (gocyclo)
    • yorc/deployments/operations.go
    • Line 572: warning: cyclomatic complexity 31 of function GetOperationInput() is high (> 15) (gocyclo)
    • Line 712: warning: cyclomatic complexity 21 of function GetOperationInputPropertyDefinitionDefault() is high (> 15) (gocyclo)
    • yorc/deployments/capabilities.go
    • Line 244: warning: cyclomatic complexity 34 of function GetInstanceCapabilityAttributeValue() is high (> 15) (gocyclo)
    • Line 133: warning: cyclomatic complexity 33 of function GetCapabilityPropertyValue() is high (> 15) (gocyclo)
    • yorc/deployments/resolver.go
    • Line 213: warning: cyclomatic complexity 34 of function (*functionResolver).resolveGetPropertyOrAttribute() is high (> 15) (gocyclo)
    • Line 90: warning: cyclomatic complexity 19 of function (*functionResolver).resolveFunction() is high (> 15) (gocyclo)
    • Line 157: warning: cyclomatic complexity 16 of function (*functionResolver).resolveGetOperationOutput() is high (> 15) (gocyclo)
    • yorc/prov/slurm/execution.go
    • Line 267: warning: cyclomatic complexity 56 of function (*executionCommon).buildJobInfo() is high (> 15) (gocyclo)
    • Line 161: warning: cyclomatic complexity 22 of function (*executionCommon).execute() is high (> 15) (gocyclo)
    • yorc/prov/ansible/execution.go
    • Line 884: warning: cyclomatic complexity 66 of function (*executionCommon).executeWithCurrentInstance() is high (> 15) (gocyclo)
    • Line 477: warning: cyclomatic complexity 19 of function (*executionCommon).resolveContext() is high (> 15) (gocyclo)
    • Line 397: warning: cyclomatic complexity 16 of function (*executionCommon).resolveHostsOnCompute() is high (> 15) (gocyclo)

golint99%

Golint is a linter for Go source code.

    • yorc/deployments/definition_store_test.go
    • Line 179: warning: context.Context should be the first parameter of a function (golint)
    • Line 257: warning: context.Context should be the first parameter of a function (golint)
    • Line 344: warning: context.Context should be the first parameter of a function (golint)
    • Line 418: warning: context.Context should be the first parameter of a function (golint)
    • Line 518: warning: context.Context should be the first parameter of a function (golint)
    • Line 606: warning: context.Context should be the first parameter of a function (golint)
    • Line 732: warning: context.Context should be the first parameter of a function (golint)
    • Line 783: warning: context.Context should be the first parameter of a function (golint)
    • yorc/tosca/states.go
    • Line 72: warning: don't use underscores in Go names; const _NodeState_name should be _NodeStateName (golint)
    • Line 74: warning: don't use underscores in Go names; var _NodeState_index should be _NodeStateIndex (golint)
    • Line 83: warning: don't use underscores in Go names; var _NodeStateNameToValue_map should be _NodeStateNameToValueMap (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign91%

IneffAssign detects ineffectual assignments in Go code.

    • yorc/prov/hostspool/hostspool_mgr_test.go
    • Line 642: warning: ineffectual assignment to warnings (ineffassign)
    • Line 642: warning: ineffectual assignment to err (ineffassign)
    • Line 792: warning: ineffectual assignment to warnings (ineffassign)
    • Line 828: warning: ineffectual assignment to warnings (ineffassign)
    • Line 828: warning: ineffectual assignment to err (ineffassign)
    • Line 970: warning: ineffectual assignment to warnings (ineffassign)
    • Line 970: warning: ineffectual assignment to err (ineffassign)
    • Line 1155: warning: ineffectual assignment to warnings (ineffassign)
    • Line 1155: warning: ineffectual assignment to err (ineffassign)
    • Line 1174: warning: ineffectual assignment to warnings (ineffassign)
    • Line 1174: warning: ineffectual assignment to err (ineffassign)
    • Line 1231: warning: ineffectual assignment to warnings (ineffassign)
    • Line 1231: warning: ineffectual assignment to err (ineffassign)
    • Line 1246: warning: ineffectual assignment to warnings (ineffassign)
    • Line 1246: warning: ineffectual assignment to err (ineffassign)
    • Line 1306: warning: ineffectual assignment to warnings (ineffassign)
    • Line 1306: warning: ineffectual assignment to err (ineffassign)
    • Line 1325: warning: ineffectual assignment to warnings (ineffassign)
    • Line 1325: warning: ineffectual assignment to err (ineffassign)
    • Line 1468: warning: ineffectual assignment to warnings (ineffassign)
    • Line 1468: warning: ineffectual assignment to err (ineffassign)
    • yorc/deployments/instances_test.go
    • Line 45: warning: ineffectual assignment to err (ineffassign)
    • Line 47: warning: ineffectual assignment to actualState (ineffassign)
    • Line 85: warning: ineffectual assignment to err (ineffassign)
    • Line 87: warning: ineffectual assignment to actualState (ineffassign)
    • Line 89: warning: ineffectual assignment to actualState (ineffassign)
    • yorc/rest/hosts_pool_test.go
    • Line 196: warning: ineffectual assignment to err (ineffassign)
    • Line 221: warning: ineffectual assignment to err (ineffassign)
    • Line 241: warning: ineffectual assignment to err (ineffassign)
    • Line 262: warning: ineffectual assignment to err (ineffassign)
    • Line 288: warning: ineffectual assignment to err (ineffassign)
    • Line 315: warning: ineffectual assignment to err (ineffassign)
    • Line 402: warning: ineffectual assignment to err (ineffassign)
    • yorc/tasks/workflow/worker_test.go
    • Line 93: warning: ineffectual assignment to err (ineffassign)
    • Line 96: warning: ineffectual assignment to err (ineffassign)
    • Line 99: warning: ineffectual assignment to err (ineffassign)
    • Line 108: warning: ineffectual assignment to err (ineffassign)
    • Line 111: warning: ineffectual assignment to err (ineffassign)
    • Line 154: warning: ineffectual assignment to err (ineffassign)
    • Line 157: warning: ineffectual assignment to err (ineffassign)

misspell96%

Misspell Finds commonly misspelled English words

    • yorc/commands/bootstrap/setup.go
    • Line 220: warning: "donwloaded" is a misspelling of "downloaded" (misspell)
    • Line 245: warning: "donwloaded" is a misspelling of "downloaded" (misspell)
    • Line 442: warning: "Donwload" is a misspelling of "Download" (misspell)
    • Line 458: warning: "donwloads" is a misspelling of "downloads" (misspell)
    • Line 473: warning: "donwloads" is a misspelling of "downloads" (misspell)