Preparing report...

Report for github.com/elves/elvish

A+    Excellent!    Found 63 issues across 536 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!


golint91%

Golint is a linter for Go source code.

    • elvish/pkg/daemon/internal/api/api.go
    • Line 17: warning: exported type VersionRequest should have comment or be unexported (golint)
    • Line 19: warning: exported type VersionResponse should have comment or be unexported (golint)
    • Line 23: warning: exported type PidRequest should have comment or be unexported (golint)
    • Line 25: warning: exported type PidResponse should have comment or be unexported (golint)
    • Line 31: warning: exported type NextCmdSeqRequest should have comment or be unexported (golint)
    • Line 33: warning: exported type NextCmdSeqResponse should have comment or be unexported (golint)
    • Line 37: warning: exported type AddCmdRequest should have comment or be unexported (golint)
    • Line 41: warning: exported type AddCmdResponse should have comment or be unexported (golint)
    • Line 45: warning: exported type DelCmdRequest should have comment or be unexported (golint)
    • Line 49: warning: exported type DelCmdResponse should have comment or be unexported (golint)
    • Line 52: warning: exported type CmdRequest should have comment or be unexported (golint)
    • Line 56: warning: exported type CmdResponse should have comment or be unexported (golint)
    • Line 60: warning: exported type CmdsRequest should have comment or be unexported (golint)
    • Line 65: warning: exported type CmdsResponse should have comment or be unexported (golint)
    • Line 69: warning: exported type CmdsWithSeqRequest should have comment or be unexported (golint)
    • Line 74: warning: exported type CmdsWithSeqResponse should have comment or be unexported (golint)
    • Line 78: warning: exported type NextCmdRequest should have comment or be unexported (golint)
    • Line 83: warning: exported type NextCmdResponse should have comment or be unexported (golint)
    • Line 88: warning: exported type PrevCmdRequest should have comment or be unexported (golint)
    • Line 93: warning: exported type PrevCmdResponse should have comment or be unexported (golint)
    • Line 100: warning: exported type AddDirRequest should have comment or be unexported (golint)
    • Line 105: warning: exported type AddDirResponse should have comment or be unexported (golint)
    • Line 107: warning: exported type DelDirRequest should have comment or be unexported (golint)
    • Line 111: warning: exported type DelDirResponse should have comment or be unexported (golint)
    • Line 113: warning: exported type DirsRequest should have comment or be unexported (golint)
    • Line 117: warning: exported type DirsResponse should have comment or be unexported (golint)
    • Line 123: warning: exported type SharedVarRequest should have comment or be unexported (golint)
    • Line 127: warning: exported type SharedVarResponse should have comment or be unexported (golint)
    • Line 131: warning: exported type SetSharedVarRequest should have comment or be unexported (golint)
    • Line 136: warning: exported type SetSharedVarResponse should have comment or be unexported (golint)
    • Line 138: warning: exported type DelSharedVarRequest should have comment or be unexported (golint)
    • Line 142: warning: exported type DelSharedVarResponse should have comment or be unexported (golint)
    • elvish/pkg/cli/term/buffer_builder.go
    • Line 29: warning: exported method BufferBuilder.Cursor should have comment or be unexported (golint)
    • Line 38: warning: exported method BufferBuilder.SetIndent should have comment or be unexported (golint)
    • Line 43: warning: exported method BufferBuilder.SetEagerWrap should have comment or be unexported (golint)
    • Line 53: warning: exported method BufferBuilder.SetDotHere should have comment or be unexported (golint)
    • elvish/pkg/eval/exception.go
    • Line 203: warning: exported method PipelineError.Fields should have comment or be unexported (golint)
    • Line 245: warning: exported method Flow.Fields should have comment or be unexported (golint)
    • Line 294: warning: exported method ExternalCmdExit.Fields should have comment or be unexported (golint)
    • elvish/pkg/web/web.go
    • Line 39: warning: exported type Web should have comment or be unexported (golint)
    • Line 49: warning: exported type ExecuteResponse should have comment or be unexported (golint)
    • Line 56: warning: exported method Web.Main should have comment or be unexported (golint)
    • elvish/pkg/testutil/must.go
    • Line 9: warning: exported function MustPipe should have comment or be unexported (golint)
    • Line 17: warning: exported function MustReadAllAndClose should have comment or be unexported (golint)
    • elvish/pkg/sys/fdset_unix.go
    • Line 13: warning: exported type FdSet should have comment or be unexported (golint)
    • Line 19: warning: exported function NewFdSet should have comment or be unexported (golint)
    • Line 25: warning: exported method FdSet.Clear should have comment or be unexported (golint)
    • Line 32: warning: exported method FdSet.IsSet should have comment or be unexported (golint)
    • Line 37: warning: exported method FdSet.Set should have comment or be unexported (golint)
    • Line 44: warning: exported method FdSet.Zero should have comment or be unexported (golint)
    • elvish/pkg/eval/purely_eval.go
    • Line 10: warning: exported method Evaler.PurelyEvalCompound should have comment or be unexported (golint)
    • Line 14: warning: exported method Evaler.PurelyEvalPartialCompound should have comment or be unexported (golint)
    • elvish/pkg/eval/vals/num.go
    • Line 81: warning: comment on exported function UnifyNums should be of the form "UnifyNums ..." (golint)
    • Line 180: warning: comment on exported function PromoteToBigRat should be of the form "PromoteToBigRat ..." (golint)
    • Line 207: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • elvish/pkg/cli/tk/scrollbar.go
    • Line 15: warning: exported method VScrollbarContainer.Render should have comment or be unexported (golint)
    • Line 33: warning: exported method VScrollbar.Render should have comment or be unexported (golint)
    • Line 61: warning: exported method HScrollbar.Render should have comment or be unexported (golint)
    • elvish/pkg/eval/mods/math/math.go
    • Line 696: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 744: 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)
    • elvish/pkg/persistent/hash/hash.go
    • Line 7: warning: exported const DJBInit should have comment or be unexported (golint)
    • Line 9: warning: exported function DJBCombine should have comment or be unexported (golint)
    • Line 13: warning: exported function DJB should have comment or be unexported (golint)
    • Line 21: warning: exported function UInt32 should have comment or be unexported (golint)
    • Line 25: warning: exported function UInt64 should have comment or be unexported (golint)
    • Line 29: warning: exported function Pointer should have comment or be unexported (golint)
    • Line 40: warning: exported function UIntPtr should have comment or be unexported (golint)
    • Line 51: warning: exported function String should have comment or be unexported (golint)
    • elvish/pkg/shell/shell.go
    • Line 27: warning: exported method Program.ShouldRun should have comment or be unexported (golint)
    • Line 29: warning: exported method Program.Run should have comment or be unexported (golint)
    • elvish/pkg/ui/key.go
    • Line 115: warning: exported method Key.Kind should have comment or be unexported (golint)
    • Line 119: warning: exported method Key.Equal should have comment or be unexported (golint)
    • Line 123: warning: exported method Key.Hash should have comment or be unexported (golint)
    • Line 127: warning: exported method Key.Repr should have comment or be unexported (golint)

gocyclo95%

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.

    • elvish/pkg/parse/parse.go
    • Line 588: warning: cyclomatic complexity 22 of function (*Primary).doubleQuotedInner() is high (> 15) (gocyclo)
    • Line 882: warning: cyclomatic complexity 19 of function allowedInBareword() is high (> 15) (gocyclo)
    • Line 963: warning: cyclomatic complexity 17 of function parseSpacesInner() is high (> 15) (gocyclo)
    • elvish/pkg/glob/glob.go
    • Line 68: warning: cyclomatic complexity 26 of function glob() is high (> 15) (gocyclo)
    • Line 188: warning: cyclomatic complexity 19 of function matchElement() is high (> 15) (gocyclo)

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!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!