Preparing report...

Report for gitlab.com/rackn/provision/v4

(v4.10.4)

A+    Excellent!    Found 49 issues across 188 files

Tweet

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!


gofmt99%

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


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


gocyclo73%

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.

    • models/content.go
    • Line 212: warning: cyclomatic complexity 28 of function (*Content).FromStore() is high (> 15) (gocyclo)
    • Line 339: warning: cyclomatic complexity 23 of function (*ContentSummary).FromStore() is high (> 15) (gocyclo)
    • models/whoami.go
    • Line 184: warning: cyclomatic complexity 20 of function (*Whoami).Fill() is high (> 15) (gocyclo)
    • Line 303: warning: cyclomatic complexity 19 of function (*Whoami).Score() is high (> 15) (gocyclo)
    • cli/bootenv.go
    • Line 27: warning: cyclomatic complexity 31 of function registerBootEnv() is high (> 15) (gocyclo)
    • cli/appleNBI.go
    • Line 23: warning: cyclomatic complexity 23 of function genEnvAndArchiveFromAppleNBI() is high (> 15) (gocyclo)
    • cli/utils.go
    • Line 692: warning: cyclomatic complexity 60 of function downloadCatalog() is high (> 15) (gocyclo)
    • Line 227: warning: cyclomatic complexity 23 of function lamePrinter() is high (> 15) (gocyclo)
    • Line 425: warning: cyclomatic complexity 22 of function createFile() is high (> 15) (gocyclo)
    • Line 81: warning: cyclomatic complexity 17 of function urlOrFileAsReadCloser() is high (> 15) (gocyclo)
    • Line 130: warning: cyclomatic complexity 16 of function bufOrFile() is high (> 15) (gocyclo)
    • agent/taskRunner.go
    • Line 307: warning: cyclomatic complexity 47 of function (*runner).run() is high (> 15) (gocyclo)
    • Line 175: warning: cyclomatic complexity 27 of function (*runner).perform() is high (> 15) (gocyclo)
    • cli/system.go
    • Line 35: warning: cyclomatic complexity 79 of function addSystemCommands() is high (> 15) (gocyclo)
    • cli/clusters.go
    • Line 18: warning: cyclomatic complexity 70 of function registerCluster() is high (> 15) (gocyclo)
    • cli/netwrangle.go
    • Line 25: warning: cyclomatic complexity 31 of function writeNetCfg() is high (> 15) (gocyclo)
    • Line 156: warning: cyclomatic complexity 27 of function registerNet() is high (> 15) (gocyclo)
    • agent/agent.go
    • Line 321: warning: cyclomatic complexity 23 of function (*Agent).Run() is high (> 15) (gocyclo)
    • models/bootenv.go
    • Line 495: warning: cyclomatic complexity 22 of function (*BootEnv).MergeOverrides() is high (> 15) (gocyclo)
    • cli/contents.go
    • Line 175: warning: cyclomatic complexity 95 of function registerContent() is high (> 15) (gocyclo)
    • Line 76: warning: cyclomatic complexity 17 of function encryptAfterDownload() is high (> 15) (gocyclo)
    • models/aaplbsdp.go
    • Line 77: warning: cyclomatic complexity 17 of function (*BsdpBootOption).UnmarshalText() is high (> 15) (gocyclo)
    • api/content.go
    • Line 79: warning: cyclomatic complexity 18 of function (*Client).BundleContent() is high (> 15) (gocyclo)
    • cli/pools.go
    • Line 15: warning: cyclomatic complexity 41 of function registerPool() is high (> 15) (gocyclo)
    • agent/workflow.go
    • Line 68: warning: cyclomatic complexity 26 of function (*Agent).loadKexec() is high (> 15) (gocyclo)
    • Line 317: warning: cyclomatic complexity 17 of function (*Agent).changeStage() is high (> 15) (gocyclo)
    • Line 402: warning: cyclomatic complexity 16 of function (*Agent).runTaskInWorkflow() is high (> 15) (gocyclo)
    • cli/startup.go
    • Line 168: warning: cyclomatic complexity 105 of function NewApp() is high (> 15) (gocyclo)
    • Line 92: warning: cyclomatic complexity 28 of function ppr() is high (> 15) (gocyclo)
    • cli/machines.go
    • Line 36: warning: cyclomatic complexity 99 of function registerMachine() is high (> 15) (gocyclo)
    • cli/agent.go
    • Line 99: warning: cyclomatic complexity 17 of function (*agentProg).Start() is high (> 15) (gocyclo)
    • cli/airgap.go
    • Line 372: warning: cyclomatic complexity 40 of function downloadIsos() is high (> 15) (gocyclo)
    • Line 495: warning: cyclomatic complexity 22 of function airgapCommands() is high (> 15) (gocyclo)
    • Line 292: warning: cyclomatic complexity 19 of function downloadContexts() is high (> 15) (gocyclo)
    • Line 169: warning: cyclomatic complexity 16 of function explodeTar() is high (> 15) (gocyclo)
    • cli/inspect.go
    • Line 50: warning: cyclomatic complexity 25 of function inspectCommands() is high (> 15) (gocyclo)
    • cli/files.go
    • Line 14: warning: cyclomatic complexity 32 of function blobCommands() is high (> 15) (gocyclo)
    • cli/info.go
    • Line 27: warning: cyclomatic complexity 35 of function addInfoCommands() is high (> 15) (gocyclo)
    • cli/subnet.go
    • Line 17: warning: cyclomatic complexity 28 of function registerSubnet() is high (> 15) (gocyclo)
    • cli/support.go
    • Line 41: warning: cyclomatic complexity 28 of function bundleCmds() is high (> 15) (gocyclo)
    • models/ha-state.go
    • Line 226: warning: cyclomatic complexity 23 of function (*CurrentHAState).Validate() is high (> 15) (gocyclo)
    • api/utils.go
    • Line 147: warning: cyclomatic complexity 43 of function BuildCatalog() is high (> 15) (gocyclo)
    • Line 78: warning: cyclomatic complexity 21 of function PrettyColor() is high (> 15) (gocyclo)
    • Line 509: warning: cyclomatic complexity 18 of function compareVersion() is high (> 15) (gocyclo)
    • cli/catalog.go
    • Line 118: warning: cyclomatic complexity 37 of function catalogCommands() is high (> 15) (gocyclo)
    • Line 44: warning: cyclomatic complexity 20 of function installItem() is high (> 15) (gocyclo)
    • api/bootenv.go
    • Line 44: warning: cyclomatic complexity 22 of function (*Client).InstallISOForBootenv() is high (> 15) (gocyclo)
    • Line 141: warning: cyclomatic complexity 18 of function (*Client).InstallBootEnvFromFile() is high (> 15) (gocyclo)
    • plugin/plugin.go
    • Line 204: warning: cyclomatic complexity 18 of function InitApp() is high (> 15) (gocyclo)
    • Line 427: warning: cyclomatic complexity 16 of function configHandler() is high (> 15) (gocyclo)
    • api/client.go
    • Line 158: warning: cyclomatic complexity 25 of function (*Client).SignRackNUrl() is high (> 15) (gocyclo)
    • Line 744: warning: cyclomatic complexity 23 of function (*R).Do() is high (> 15) (gocyclo)
    • Line 640: warning: cyclomatic complexity 19 of function (*R).Response() is high (> 15) (gocyclo)
    • api/await.go
    • Line 52: warning: cyclomatic complexity 16 of function ParseAwaitFunctions() is high (> 15) (gocyclo)
    • cli/jobs.go
    • Line 18: warning: cyclomatic complexity 32 of function registerJob() is high (> 15) (gocyclo)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell99%

Misspell Finds commonly misspelled English words

    • cli/bootenv.go
    • Line 80: warning: "seperated" is a misspelling of "separated" (misspell)
    • Line 167: warning: "seperated" is a misspelling of "separated" (misspell)