Preparing report...

Report for github.com/fabric8io/gofabric8

A    Great!    Found 52 issues across 56 files

Tweet

gofmt87%

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!


golint7%

Golint is a linter for Go source code.

    • gofabric8/util/util.go
    • Line 1: warning: package comment should be of the form "Package util ..." (golint)
    • Line 49: warning: exported function IsMiniShift should have comment or be unexported (golint)
    • gofabric8/cmds/environ.go
    • Line 1: warning: package comment should be of the form "Package cmds ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 37: warning: exported type EnvironmentData should have comment or be unexported (golint)
    • Line 43: warning: exported function NewCmdGetEnviron should have comment or be unexported (golint)
    • Line 81: warning: exported function NewCmdCreateEnviron should have comment or be unexported (golint)
    • Line 118: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 133: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • gofabric8/cmds/start.go
    • Line 1: warning: package comment should be of the form "Package cmds ..." (golint)
    • Line 86: warning: don't use underscores in Go names; var cmd_out should be cmdOut (golint)
    • Line 87: warning: don't use underscores in Go names; var cmd_stderr should be cmdStderr (golint)
    • gofabric8/version/info.go
    • Line 42: warning: exported const VersionPrefix should have comment or be unexported (golint)
    • Line 44: warning: exported function GetVersion should have comment or be unexported (golint)
    • Line 48: warning: exported function GetSemverVersion should have comment or be unexported (golint)
    • gofabric8/cmds/tenant_upgrade.go
    • Line 1: warning: package comment should be of the form "Package cmds ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 24: warning: exported function NewCmdTenantUpdate should have comment or be unexported (golint)
    • gofabric8/cmds/wait_for.go
    • Line 1: warning: package comment should be of the form "Package cmds ..." (golint)
    • Line 41: warning: exported function NewCmdWaitFor should have comment or be unexported (golint)
    • Line 227: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • gofabric8/cmds/common.go
    • Line 1: warning: package comment should be of the form "Package cmds ..." (golint)
    • Line 44: warning: exported type Result should have comment or be unexported (golint)
    • Line 47: warning: exported const Success should have comment (or a comment on this block) or be unexported (golint)
    • Line 262: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 283: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • gofabric8/cmds/cruds.go
    • Line 1: warning: package comment should be of the form "Package cmds ..." (golint)
    • Line 32: warning: exported function NewCmdCreate should have comment or be unexported (golint)
    • Line 43: warning: exported function NewCmdDelete should have comment or be unexported (golint)
    • Line 59: warning: exported function NewCmdCleanUp should have comment or be unexported (golint)
    • Line 76: warning: exported function NewCmdGet should have comment or be unexported (golint)
    • gofabric8/cmds/tenant_check.go
    • Line 1: warning: package comment should be of the form "Package cmds ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 34: warning: exported function NewCmdTenantCheck should have comment or be unexported (golint)
    • gofabric8/client/client.go
    • Line 1: warning: package comment should be of the form "Package client ..." (golint)
    • Line 26: warning: exported function NewClient should have comment or be unexported (golint)
    • Line 43: warning: exported function NewDefaultClient should have comment or be unexported (golint)
    • Line 55: warning: exported function NewOpenShiftClient should have comment or be unexported (golint)
    • gofabric8/cmds/cleanup.go
    • Line 1: warning: package comment should be of the form "Package cmds ..." (golint)
    • Line 36: warning: comment on exported function NewCmdCleanUpSystem should be of the form "NewCmdCleanUpSystem ..." (golint)
    • Line 69: warning: exported function NewCmdCleanUpApp should have comment or be unexported (golint)
    • gofabric8/cmds/completion.go
    • Line 1: warning: package comment should be of the form "Package cmds ..." (golint)
    • Line 27: warning: don't use underscores in Go names; const completion_long should be completionLong (golint)
    • Line 32: warning: don't use underscores in Go names; const completion_example should be completionExample (golint)
    • Line 50: warning: don't use underscores in Go names; var completion_shells should be completionShells (golint)
    • Line 56: warning: exported function NewCmdCompletion should have comment or be unexported (golint)
    • Line 77: warning: exported function RunCompletion should have comment or be unexported (golint)
    • Line 97: warning: don't use underscores in Go names; var zsh_initialization should be zshInitialization (golint)
    • Line 252: warning: don't use underscores in Go names; var zsh_tail should be zshTail (golint)
    • gofabric8/cmds/ingress.go
    • Line 1: warning: package comment should be of the form "Package cmds ..." (golint)
    • Line 30: warning: exported function NewCmdIngress should have comment or be unexported (golint)
    • gofabric8/cmds/install.go
    • Line 1: warning: package comment should be of the form "Package cmds ..." (golint)
    • Line 192: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • gofabric8/cmds/tenant.go
    • Line 1: warning: package comment should be of the form "Package cmds ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 23: warning: exported function NewCmdTenant should have comment or be unexported (golint)
    • gofabric8/cmds/validate.go
    • Line 1: warning: package comment should be of the form "Package cmds ..." (golint)
    • Line 35: warning: exported function NewCmdValidate should have comment or be unexported (golint)
    • gofabric8/util/terminal.go
    • Line 1: warning: package comment should be of the form "Package util ..." (golint)
    • Line 25: warning: exported function Infof should have comment or be unexported (golint)
    • Line 29: warning: exported function Info should have comment or be unexported (golint)
    • Line 33: warning: exported function Blank should have comment or be unexported (golint)
    • Line 37: warning: exported function Warnf should have comment or be unexported (golint)
    • Line 41: warning: exported function Warn should have comment or be unexported (golint)
    • Line 47: warning: exported function Errorf should have comment or be unexported (golint)
    • Line 51: warning: exported function Error should have comment or be unexported (golint)
    • Line 57: warning: exported function Fatalf should have comment or be unexported (golint)
    • Line 61: warning: exported function Fatal should have comment or be unexported (golint)
    • Line 68: warning: exported function Success should have comment or be unexported (golint)
    • Line 74: warning: exported function Successf should have comment or be unexported (golint)
    • Line 78: warning: exported function Failure should have comment or be unexported (golint)
    • Line 84: warning: exported function Failuref should have comment or be unexported (golint)
    • gofabric8/cmds/deploy.go
    • Line 1: warning: package comment should be of the form "Package cmds ..." (golint)
    • Line 95: warning: exported const Fabric8SCC should have comment (or a comment on this block) or be unexported (golint)
    • Line 165: warning: exported type Metadata should have comment or be unexported (golint)
    • Line 170: warning: comment on exported type DefaultFabric8Deployment should be of the form "DefaultFabric8Deployment ..." (with optional leading article) (golint)
    • Line 209: warning: exported function NewCmdDeploy should have comment or be unexported (golint)
    • Line 988: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 1196: warning: should omit 2nd value from range; this loop is equivalent to `for i := range ...` (golint)
    • Line 1231: warning: should omit 2nd value from range; this loop is equivalent to `for i := range ...` (golint)
    • Line 1565: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 1580: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 1597: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 1765: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • gofabric8/cmds/packages.go
    • Line 1: warning: package comment should be of the form "Package cmds ..." (golint)
    • Line 30: warning: exported function NewCmdPackages should have comment or be unexported (golint)
    • gofabric8/cmds/volumes.go
    • Line 1: warning: package comment should be of the form "Package cmds ..." (golint)
    • Line 38: warning: exported function NewCmdVolumes should have comment or be unexported (golint)
    • Line 214: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • gofabric8/util/types.go
    • Line 1: warning: package comment should be of the form "Package util ..." (golint)
    • Line 25: warning: exported type MasterType should have comment or be unexported (golint)
    • Line 28: warning: exported const OpenShift should have comment (or a comment on this block) or be unexported (golint)
    • Line 32: warning: exported function TypeOfMaster should have comment or be unexported (golint)
    • gofabric8/cmds/routes.go
    • Line 1: warning: package comment should be of the form "Package cmds ..." (golint)
    • Line 30: warning: exported function NewCmdRoutes should have comment or be unexported (golint)
    • gofabric8/cmds/secrets.go
    • Line 1: warning: package comment should be of the form "Package cmds ..." (golint)
    • Line 47: warning: exported type Keypair should have comment or be unexported (golint)
    • Line 52: warning: exported function NewCmdSecrets should have comment or be unexported (golint)
    • Line 386: warning: don't use underscores in Go names; var priv_der should be privDer (golint)
    • Line 390: warning: don't use underscores in Go names; var priv_blk should be privBlk (golint)
    • Line 398: warning: don't use underscores in Go names; var priv_pem should be privPem (golint)
    • gofabric8/cmds/upgrade.go
    • Line 1: warning: package comment should be of the form "Package cmds ..." (golint)
    • Line 44: warning: exported function NewCmdUpgrade should have comment or be unexported (golint)
    • gofabric8/cmds/che.go
    • Line 1: warning: package comment should be of the form "Package cmds ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 41: warning: exported function NewCmdCheShell should have comment or be unexported (golint)
    • gofabric8/cmds/run.go
    • Line 1: warning: package comment should be of the form "Package cmds ..." (golint)
    • Line 27: warning: exported function NewCmdRun should have comment or be unexported (golint)
    • gofabric8/cmds/tenant_delete.go
    • Line 1: warning: package comment should be of the form "Package cmds ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 38: warning: exported function NewCmdTenantDelete should have comment or be unexported (golint)
    • gofabric8/cmds/pull.go
    • Line 1: warning: package comment should be of the form "Package cmds ..." (golint)
    • Line 35: warning: exported function NewCmdPull should have comment or be unexported (golint)
    • Line 108: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • gofabric8/cmds/service.go
    • Line 1: warning: package comment should be of the form "Package cmds ..." (golint)
    • Line 327: warning: exported function Retry should have comment or be unexported (golint)
    • Line 331: warning: exported function RetryAfter should have comment or be unexported (golint)
    • Line 344: warning: exported type MultiError should have comment or be unexported (golint)
    • Line 348: warning: exported method MultiError.Collect should have comment or be unexported (golint)
    • Line 354: warning: exported method MultiError.ToError should have comment or be unexported (golint)
    • gofabric8/cmds/version.go
    • Line 1: warning: package comment should be of the form "Package cmds ..." (golint)
    • Line 43: warning: exported function NewCmdVersion should have comment or be unexported (golint)

gocyclo78%

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.

    • gofabric8/cmds/deploy.go
    • Line 315: warning: cyclomatic complexity 55 of function deploy() is high (> 15) (gocyclo)
    • Line 1376: warning: cyclomatic complexity 45 of function processResource() is high (> 15) (gocyclo)
    • Line 609: warning: cyclomatic complexity 20 of function getTemplateURI() is high (> 15) (gocyclo)
    • Line 998: warning: cyclomatic complexity 19 of function createTemplate() is high (> 15) (gocyclo)

ineffassign89%

IneffAssign detects ineffectual assignments in Go code.


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell91%

Misspell Finds commonly misspelled English words

    • gofabric8/cmds/environ.go
    • Line 122: warning: "Unkown" is a misspelling of "Unknown" (misspell)
    • Line 161: warning: "enviroment" is a misspelling of "environment" (misspell)
    • Line 226: warning: "immediatly" is a misspelling of "immediately" (misspell)