Preparing report...

Report for github.com/zetamatta/nyagos

A+    Excellent!    Found 44 issues across 172 files

Tweet

gofmt99%

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!


gocyclo90%

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.

    • nyagos/history/history.go
    • Line 37: warning: cyclomatic complexity 35 of function (*Container).Replace() is high (> 15) (gocyclo)
    • Line 179: warning: cyclomatic complexity 18 of function expandMacro() is high (> 15) (gocyclo)
    • nyagos/shell/parser.go
    • Line 340: warning: cyclomatic complexity 61 of function parse1() is high (> 15) (gocyclo)
    • Line 135: warning: cyclomatic complexity 45 of function string2word() is high (> 15) (gocyclo)
    • nyagos/commands/ls_windows.go
    • Line 79: warning: cyclomatic complexity 26 of function lsOneLong() is high (> 15) (gocyclo)
    • Line 339: warning: cyclomatic complexity 21 of function lsFolder() is high (> 15) (gocyclo)
    • Line 417: warning: cyclomatic complexity 19 of function lsCore() is high (> 15) (gocyclo)
    • Line 188: warning: cyclomatic complexity 19 of function lsBox() is high (> 15) (gocyclo)
    • nyagos/completion/completion.go
    • Line 96: warning: cyclomatic complexity 25 of function listUpComplete() is high (> 15) (gocyclo)
    • Line 287: warning: cyclomatic complexity 19 of function KeyFuncCompletion() is high (> 15) (gocyclo)

golint81%

Golint is a linter for Go source code.

    • nyagos/shell/source.go
    • Line 61: warning: exported type Source should have comment or be unexported (golint)
    • Line 73: warning: exported method Source.Call should have comment or be unexported (golint)
    • Line 110: warning: exported type CmdExe should have comment or be unexported (golint)
    • Line 120: warning: exported method CmdExe.Run should have comment or be unexported (golint)
    • nyagos/history/history.go
    • Line 19: warning: exported var Mark should have comment or be unexported (golint)
    • Line 21: warning: exported var DisableMarks should have comment or be unexported (golint)
    • Line 37: warning: exported method Container.Replace should have comment or be unexported (golint)
    • Line 217: warning: exported var MaxSaveHistory should have comment or be unexported (golint)
    • Line 219: warning: exported method Container.SaveViaWriter should have comment or be unexported (golint)
    • Line 231: warning: exported method Container.Save should have comment or be unexported (golint)
    • Line 240: warning: exported method Container.LoadViaReader should have comment or be unexported (golint)
    • Line 272: warning: exported method Container.Load should have comment or be unexported (golint)
    • nyagos/shell/interpreter.go
    • Line 18: warning: exported var WildCardExpansionAlways should have comment or be unexported (golint)
    • Line 22: warning: exported function Message should have comment or be unexported (golint)
    • Line 42: warning: exported type CloneCloser should have comment or be unexported (golint)
    • Line 47: warning: exported type History should have comment or be unexported (golint)
    • Line 59: warning: exported type Shell should have comment or be unexported (golint)
    • Line 71: warning: exported method Shell.In should have comment or be unexported (golint)
    • Line 72: warning: exported method Shell.Out should have comment or be unexported (golint)
    • Line 73: warning: exported method Shell.Err should have comment or be unexported (golint)
    • Line 74: warning: exported method Shell.Term should have comment or be unexported (golint)
    • Line 75: warning: exported method Shell.Tag should have comment or be unexported (golint)
    • Line 76: warning: exported method Shell.SetTag should have comment or be unexported (golint)
    • Line 77: warning: exported method Shell.GetHistory should have comment or be unexported (golint)
    • Line 79: warning: exported type Cmd should have comment or be unexported (golint)
    • Line 91: warning: exported method Cmd.Arg should have comment or be unexported (golint)
    • Line 92: warning: exported method Cmd.Args should have comment or be unexported (golint)
    • Line 93: warning: exported method Cmd.RawArg should have comment or be unexported (golint)
    • Line 94: warning: exported method Cmd.RawArgs should have comment or be unexported (golint)
    • Line 95: warning: exported method Cmd.SetRawArgs should have comment or be unexported (golint)
    • Line 131: warning: exported method Cmd.SetArgs should have comment or be unexported (golint)
    • Line 142: warning: exported method Cmd.Getenv should have comment or be unexported (golint)
    • Line 151: warning: exported method Cmd.Setenv should have comment or be unexported (golint)
    • Line 158: warning: exported method Cmd.DumpEnv should have comment or be unexported (golint)
    • Line 176: warning: exported var LookCurdirOrder should have comment or be unexported (golint)
    • Line 178: warning: exported method Cmd.FullPath should have comment or be unexported (golint)
    • Line 188: warning: exported method Cmd.Close should have comment or be unexported (golint)
    • Line 197: warning: exported method Shell.Close should have comment or be unexported (golint)
    • Line 199: warning: exported function New should have comment or be unexported (golint)
    • Line 220: warning: exported method Shell.Command should have comment or be unexported (golint)
    • Line 240: warning: exported type ArgsHookT should have comment or be unexported (golint)
    • Line 246: warning: exported function SetArgsHook should have comment or be unexported (golint)
    • Line 251: warning: exported type HookT should have comment or be unexported (golint)
    • Line 257: warning: exported function SetHook should have comment or be unexported (golint)
    • Line 262: warning: exported var OnCommandNotFound should have comment or be unexported (golint)
    • Line 267: warning: exported var LastErrorLevel should have comment or be unexported (golint)
    • Line 273: warning: exported var UseSourceRunBatch should have comment or be unexported (golint)
    • Line 357: warning: exported type AlreadyReportedError should have comment or be unexported (golint)
    • Line 374: warning: exported var PreExecHook should have comment or be unexported (golint)
    • Line 375: warning: exported var PostExecHook should have comment or be unexported (golint)
    • Line 377: warning: exported method Cmd.Spawnvp should have comment or be unexported (golint)
    • Line 400: warning: exported method Shell.Spawnlpe should have comment or be unexported (golint)
    • Line 418: warning: exported method Shell.Spawnlp should have comment or be unexported (golint)
    • Line 423: warning: exported method Shell.Interpret should have comment or be unexported (golint)
    • nyagos/shell/parser.go
    • Line 21: warning: exported var NoClobber should have comment or be unexported (golint)
    • Line 34: warning: exported var PercentFunc should have comment or be unexported (golint)
    • Line 113: warning: exported function OurGetEnv should have comment or be unexported (golint)
    • Line 133: warning: exported var TildeExpansion should have comment or be unexported (golint)
    • nyagos/functions/builtinfunc.go
    • Line 39: warning: exported const TooFewArguments should have comment or be unexported (golint)
    • Line 54: warning: exported function CmdChdir should have comment or be unexported (golint)
    • Line 62: warning: exported function CmdBox should have comment or be unexported (golint)
    • Line 87: warning: exported function CmdResetCharWidth should have comment or be unexported (golint)
    • Line 92: warning: exported function CmdGetwd should have comment or be unexported (golint)
    • Line 100: warning: exported function CmdGetKey should have comment or be unexported (golint)
    • Line 117: warning: exported function CmdGetViewWidth should have comment or be unexported (golint)
    • Line 147: warning: exported function CmdPathJoin should have comment or be unexported (golint)
    • Line 159: warning: exported function CmdDirName should have comment or be unexported (golint)
    • Line 174: warning: exported function CmdAccess should have comment or be unexported (golint)
    • Line 208: warning: exported function CmdStat should have comment or be unexported (golint)
    • Line 248: warning: exported function CmdSetEnv should have comment or be unexported (golint)
    • Line 262: warning: exported function CmdGetEnv should have comment or be unexported (golint)
    • Line 274: warning: exported function CmdWhich should have comment or be unexported (golint)
    • Line 286: warning: exported function CmdGlob should have comment or be unexported (golint)
    • Line 301: warning: exported function CmdGetHistory should have comment or be unexported (golint)
    • Line 313: warning: exported function CmdLenHistory should have comment or be unexported (golint)
    • Line 320: warning: exported function CmdRawEval should have comment or be unexported (golint)
    • Line 330: warning: exported function CmdSetRuneWidth should have comment or be unexported (golint)
    • Line 346: warning: exported function CmdCommonPrefix should have comment or be unexported (golint)
    • Line 362: warning: exported function CmdWriteSub should have comment or be unexported (golint)
    • Line 393: warning: exported function CmdWrite should have comment or be unexported (golint)
    • Line 397: warning: exported function CmdWriteErr should have comment or be unexported (golint)
    • Line 401: warning: exported function CmdPrint should have comment or be unexported (golint)
    • Line 424: warning: exported function GetOption should have comment or be unexported (golint)
    • Line 436: warning: exported function SetOption should have comment or be unexported (golint)
    • Line 469: warning: exported function CmdBitAnd should have comment or be unexported (golint)
    • Line 473: warning: exported function CmdBitOr should have comment or be unexported (golint)
    • Line 477: warning: exported function CmdBitXor should have comment or be unexported (golint)
    • Line 481: warning: exported function CmdFields should have comment or be unexported (golint)
    • Line 489: warning: exported function CmdEnvAdd should have comment or be unexported (golint)
    • Line 502: warning: exported function CmdEnvDel should have comment or be unexported (golint)
    • Line 528: warning: exported function CmdCompleteForFiles should have comment or be unexported (golint)
    • nyagos/nodos/copy.go
    • Line 3: warning: exported function Copy should have comment or be unexported (golint)
    • Line 7: warning: exported function Move should have comment or be unexported (golint)
    • nyagos/functions/builtinfunc_unix.go
    • Line 5: warning: exported function CmdMsgBox should have comment or be unexported (golint)
    • Line 9: warning: exported function CmdElevated should have comment or be unexported (golint)
    • Line 12: warning: exported function CmdShellExecute should have comment or be unexported (golint)
    • Line 15: warning: exported function CmdRawExec should have comment or be unexported (golint)
    • Line 18: warning: exported function CmdAtoU should have comment or be unexported (golint)
    • Line 21: warning: exported function CmdUtoA should have comment or be unexported (golint)
    • nyagos/frame/stream.go
    • Line 18: warning: exported type CmdStreamConsole should have comment or be unexported (golint)
    • Line 26: warning: exported function NewCmdStreamConsole should have comment or be unexported (golint)
    • Line 45: warning: exported method CmdStreamConsole.DisableHistory should have comment or be unexported (golint)
    • Line 49: warning: exported method CmdStreamConsole.ReadLine should have comment or be unexported (golint)
    • nyagos/completion/files.go
    • Line 18: warning: exported var IncludeHidden should have comment or be unexported (golint)
    • Line 20: warning: exported function ListUpFiles should have comment or be unexported (golint)
    • Line 29: warning: exported type UncCompletion should have comment or be unexported (golint)
    • Line 32: warning: exported const DoNotUncCompletion should have comment (or a comment on this block) or be unexported (golint)
    • nyagos/nodos/copy_unix.go
    • Line 39: 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)
    • nyagos/functions/table.go
    • Line 3: warning: exported var Table should have comment or be unexported (golint)
    • Line 33: warning: exported var Table2 should have comment or be unexported (golint)
    • nyagos/frame/main.go
    • Line 25: warning: exported var DefaultHistory should have comment or be unexported (golint)
    • Line 27: warning: exported function Start should have comment or be unexported (golint)
    • nyagos/completion/completion.go
    • Line 19: warning: exported type Element should have comment or be unexported (golint)
    • Line 24: warning: exported type Element2 should have comment or be unexported (golint)
    • Line 27: warning: exported method Element2.Display should have comment or be unexported (golint)
    • Line 29: warning: exported type Element1 should have comment or be unexported (golint)
    • Line 32: warning: exported method Element1.Display should have comment or be unexported (golint)
    • Line 34: warning: exported type List should have comment or be unexported (golint)
    • Line 44: warning: exported var UseSlash should have comment or be unexported (golint)
    • Line 58: warning: exported type CustomCompleter should have comment or be unexported (golint)
    • Line 76: warning: exported var CustomCompletion should have comment or be unexported (golint)
    • Line 222: warning: exported function CommonPrefix should have comment or be unexported (golint)
    • Line 287: warning: exported function KeyFuncCompletion should have comment or be unexported (golint)
    • nyagos/history/type.go
    • Line 28: warning: comment on exported method Container.GetAt should be of the form "GetAt ..." (golint)
    • Line 36: warning: exported method Container.At should have comment or be unexported (golint)
    • Line 40: warning: exported method Container.DumpAt should have comment or be unexported (golint)
    • Line 49: warning: exported method Container.IgnorePush should have comment or be unexported (golint)
    • nyagos/shell/streamfile.go
    • Line 11: warning: exported type CmdSeeker should have comment or be unexported (golint)
    • Line 16: warning: exported type CmdStreamFile should have comment or be unexported (golint)
    • Line 21: warning: exported method CmdStreamFile.DisableHistory should have comment or be unexported (golint)
    • Line 25: warning: exported function NewCmdStreamFile should have comment or be unexported (golint)
    • Line 35: warning: exported method CmdStreamFile.ReadLine should have comment or be unexported (golint)
    • Line 54: warning: exported method Shell.Source should have comment or be unexported (golint)
    • nyagos/completion/env.go
    • Line 9: warning: exported type IVariable should have comment or be unexported (golint)
    • Line 14: warning: exported type EnvironmentVariable should have comment or be unexported (golint)
    • Line 17: warning: exported method EnvironmentVariable.Lookup should have comment or be unexported (golint)
    • Line 21: warning: exported method EnvironmentVariable.EachKey should have comment or be unexported (golint)
    • Line 31: warning: exported var PercentVariables should have comment or be unexported (golint)
    • nyagos/nodos/consolemode.go
    • Line 3: warning: exported type ModeOp should have comment or be unexported (golint)
    • Line 7: warning: exported type ModeReset should have comment or be unexported (golint)
    • Line 9: warning: exported method ModeReset.Op should have comment or be unexported (golint)
    • Line 13: warning: exported type ModeSet should have comment or be unexported (golint)
    • Line 15: warning: exported method ModeSet.Op should have comment or be unexported (golint)
    • Line 19: warning: exported function ChangeConsoleMode should have comment or be unexported (golint)
    • nyagos/history/command.go
    • Line 13: warning: exported type Dumper should have comment or be unexported (golint)
    • Line 18: warning: exported type Param should have comment or be unexported (golint)
    • Line 25: warning: exported function CmdHistory should have comment or be unexported (golint)
    • nyagos/frame/option.go
    • Line 26: warning: exported type ScriptEngineForOption should have comment or be unexported (golint)
    • Line 301: warning: exported function Title should have comment or be unexported (golint)
    • Line 351: warning: exported function OptionParse should have comment or be unexported (golint)
    • Line 412: warning: exported var SilentMode should have comment or be unexported (golint)
    • nyagos/shell/source_unix.go
    • Line 29: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 66: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • nyagos/nodos/fileattr.go
    • Line 4: warning: exported const REPARSE_POINT should have comment (or a comment on this block) or be unexported (golint)
    • Line 7: warning: exported function GetFileAttributes should have comment or be unexported (golint)
    • Line 11: warning: exported function SetFileAttributes should have comment or be unexported (golint)
    • nyagos/shell/bufstream.go
    • Line 8: warning: exported type BufStream should have comment or be unexported (golint)
    • Line 13: warning: exported method BufStream.DisableHistory should have comment or be unexported (golint)
    • Line 15: warning: exported method BufStream.ReadLine should have comment or be unexported (golint)
    • Line 23: warning: exported method BufStream.SetPos should have comment or be unexported (golint)
    • Line 28: warning: exported method BufStream.Add should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign99%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!