Preparing report...

Report for github.com/linuxsuren/go-cli-alias

B    Not bad!    Found 9 issues across 9 files

Tweet

gofmt77%

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!


gocyclo100%

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.

No problems detected. Good job!


golint11%

Golint is a linter for Go source code.

    • go-cli-alias/pkg/alias.go
    • Line 12: warning: exported type DefaultAliasManager should have comment or be unexported (golint)
    • Line 19: warning: exported function GetDefaultAliasMgrWithNameAndInitialData should have comment or be unexported (golint)
    • Line 38: warning: exported function GetDefaultAliasMgrWithName should have comment or be unexported (golint)
    • Line 42: warning: exported function GetDefaultAliasMgr should have comment or be unexported (golint)
    • Line 46: warning: exported method DefaultAliasManager.List should have comment or be unexported (golint)
    • Line 55: warning: exported method DefaultAliasManager.Set should have comment or be unexported (golint)
    • Line 57: warning: should omit 2nd value from range; this loop is equivalent to `for i := range ...` (golint)
    • Line 75: warning: exported method DefaultAliasManager.Delete should have comment or be unexported (golint)
    • Line 77: warning: should omit 2nd value from range; this loop is equivalent to `for index := range ...` (golint)
    • Line 103: warning: exported method DefaultAliasManager.Init should have comment or be unexported (golint)
    • go-cli-alias/pkg/type.go
    • Line 3: warning: exported const AliasKey should have comment or be unexported (golint)
    • Line 5: warning: exported type Alias should have comment or be unexported (golint)
    • Line 10: warning: exported type AliasManager should have comment or be unexported (golint)
    • go-cli-alias/pkg/cmd/root.go
    • Line 15: warning: exported function CreateDefaultCmd should have comment or be unexported (golint)
    • Line 22: warning: exported function DefaultRunE should have comment or be unexported (golint)
    • Line 44: warning: exported function RedirectToAlias should have comment or be unexported (golint)
    • Line 63: warning: exported function RegisterAliasCompletion should have comment or be unexported (golint)
    • Line 74: warning: exported function RegisterAliasCommands should have comment or be unexported (golint)
    • Line 99: warning: exported function NewRootCommand should have comment or be unexported (golint)
    • Line 112: warning: exported function AddAliasCmd should have comment or be unexported (golint)
    • Line 123: warning: exported function Execute should have comment or be unexported (golint)

license0%

Checks whether your project has a LICENSE file.


ineffassign77%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!