Preparing report...

Report for github.com/xushiwei/qlang

A+    Excellent!    Found 24 issues across 95 files

Tweet

gofmt96%

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!


gocyclo91%

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.


golint82%

Golint is a linter for Go source code.

    • qlang/exec/goroutine.go
    • Line 23: warning: exported function Go should have comment or be unexported (golint)
    • Line 49: warning: exported var ChanIn should have comment or be unexported (golint)
    • qlang/cmd/qexport/util.go
    • Line 9: warning: exported function CopyFile should have comment or be unexported (golint)
    • Line 30: warning: exported function CopyDir should have comment or be unexported (golint)
    • qlang/lib/chan/chan.go
    • Line 13: warning: exported function TrySend should have comment or be unexported (golint)
    • Line 24: warning: exported function TryRecv should have comment or be unexported (golint)
    • Line 33: warning: exported function Send should have comment or be unexported (golint)
    • Line 41: warning: exported function Recv should have comment or be unexported (golint)
    • Line 52: warning: exported function ChanIn should have comment or be unexported (golint)
    • Line 62: warning: exported function ChanOut should have comment or be unexported (golint)
    • Line 71: warning: exported function ChanOf should have comment or be unexported (golint)
    • Line 76: warning: exported function Mkchan should have comment or be unexported (golint)
    • Line 86: warning: exported function Close should have comment or be unexported (golint)
    • qlang/exec/for.go
    • Line 20: warning: exported const BreakForRange should have comment (or a comment on this block) or be unexported (golint)
    • qlang/lib/meta/meta.go
    • Line 32: warning: should omit 2nd value from range; this loop is equivalent to `for k := range ...` (golint)
    • Line 58: warning: exported function IsExported should have comment or be unexported (golint)
    • Line 63: warning: exported function ExporStructField should have comment or be unexported (golint)
    • Line 146: warning: comment on exported type ReflectValues should be of the form "ReflectValues ..." (with optional leading article) (golint)
    • qlang/exec/basic.go
    • Line 18: warning: exported function Rem should have comment or be unexported (golint)
    • Line 27: warning: exported var OnPop should have comment or be unexported (golint)
    • Line 50: warning: exported function Push should have comment or be unexported (golint)
    • Line 54: warning: exported function PopEx should have comment or be unexported (golint)
    • Line 62: warning: exported var Nil should have comment or be unexported (golint)
    • Line 77: warning: exported var Clear should have comment or be unexported (golint)
    • Line 110: warning: exported function Or should have comment or be unexported (golint)
    • Line 114: warning: exported function And should have comment or be unexported (golint)
    • Line 127: warning: exported function Jmp should have comment or be unexported (golint)
    • Line 147: warning: exported function JmpIfFalse should have comment or be unexported (golint)
    • Line 171: warning: exported function Case should have comment or be unexported (golint)
    • Line 176: warning: exported var Default should have comment or be unexported (golint)
    • Line 203: warning: exported function Op3 should have comment or be unexported (golint)
    • qlang/cmd/qexport/api.go
    • Line 20: warning: exported type KeyType should have comment or be unexported (golint)
    • Line 23: warning: exported const Normal should have comment (or a comment on this block) or be unexported (golint)
    • Line 28: warning: exported type GoApi should have comment or be unexported (golint)
    • Line 33: warning: exported function LoadApi should have comment or be unexported (golint)
    • Line 76: warning: exported type ApiCheck should have comment or be unexported (golint)
    • Line 81: warning: exported function NewApiCheck should have comment or be unexported (golint)
    • Line 87: warning: exported method ApiCheck.LoadBase should have comment or be unexported (golint)
    • Line 100: warning: exported method ApiCheck.LoadApi should have comment or be unexported (golint)
    • Line 106: warning: should omit 2nd value from range; this loop is equivalent to `for k := range ...` (golint)
    • Line 116: warning: exported method ApiCheck.FincApis should have comment or be unexported (golint)
    • Line 125: warning: exported method ApiCheck.ApiVers should have comment or be unexported (golint)
    • Line 132: warning: exported method ApiCheck.CheckConstType should have comment or be unexported (golint)
    • qlang/cmd/qexport/package.go
    • Line 16: warning: exported type DocType should have comment or be unexported (golint)
    • Line 19: warning: exported const NilType should have comment (or a comment on this block) or be unexported (golint)
    • Line 29: warning: exported type Package should have comment or be unexported (golint)
    • Line 41: warning: exported function NewPackage should have comment or be unexported (golint)
    • Line 58: warning: exported method Package.BuildPackage should have comment or be unexported (golint)
    • Line 67: warning: exported method Package.Parser should have comment or be unexported (golint)
    • Line 208: warning: exported method Package.Filter should have comment or be unexported (golint)
    • Line 224: warning: exported method Package.FilterCommon should have comment or be unexported (golint)
    • Line 253: warning: exported method Package.CommonCount should have comment or be unexported (golint)
    • Line 268: warning: comment on exported method Package.CheckTypeFields should be of the form "CheckTypeFields ..." (golint)
    • Line 308: warning: comment on exported method Package.CheckExportType should be of the form "CheckExportType ..." (golint)
    • qlang/lib/doc.go
    • Line 4: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • qlang/lib/terminal/terminal.go
    • Line 10: warning: exported type Terminal should have comment or be unexported (golint)
    • Line 17: warning: exported function New should have comment or be unexported (golint)
    • Line 28: warning: exported method Terminal.LoadHistroy should have comment or be unexported (golint)
    • Line 38: warning: exported method Terminal.SaveHistroy should have comment or be unexported (golint)
    • Line 49: warning: exported var ErrPromptAborted should have comment or be unexported (golint)
    • Line 52: warning: exported method Terminal.Scan should have comment or be unexported (golint)
    • qlang/cmd/qexport/update.go
    • Line 16: warning: exported type ObjectInfo should have comment or be unexported (golint)
    • Line 22: warning: exported type InsertInfo should have comment or be unexported (golint)
    • Line 30: warning: exported type UpdateInfo should have comment or be unexported (golint)
    • Line 46: warning: exported method InsertInfo.UpdateFile should have comment or be unexported (golint)
    • Line 73: warning: comment on exported function CheckUpdateInfo should be of the form "CheckUpdateInfo ..." (golint)
    • qlang/cl/interpreter/interpret2.go
    • Line 16: warning: exported var ErrNotObject should have comment or be unexported (golint)
    • Line 21: warning: exported type Options should have comment or be unexported (golint)
    • Line 26: warning: exported type Engine should have comment or be unexported (golint)
    • Line 38: warning: exported var InsertSemis should have comment or be unexported (golint)
    • Line 113: warning: exported function New should have comment or be unexported (golint)
    • Line 133: warning: exported method Engine.Exec should have comment or be unexported (golint)
    • Line 152: warning: exported method Engine.Eval should have comment or be unexported (golint)
    • Line 321: warning: exported method Engine.EvalCode should have comment or be unexported (golint)
    • Line 333: warning: exported function ClassOf should have comment or be unexported (golint)
    • Line 341: warning: exported function NewRuntimeError should have comment or be unexported (golint)
    • Line 348: warning: exported var Exports should have comment or be unexported (golint)
    • qlang/cmd/playground/sandbox/play.go
    • Line 47: warning: exported method Recorder.Stdout should have comment or be unexported (golint)
    • Line 48: warning: exported method Recorder.Stderr should have comment or be unexported (golint)
    • Line 76: warning: exported type Event should have comment or be unexported (golint)
    • Line 82: warning: exported method Recorder.Events should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign97%

IneffAssign detects ineffectual assignments in Go code.


misspell97%

Misspell Finds commonly misspelled English words

    • qlang/exec/call.go
    • Line 171: warning: "varity" is a misspelling of "variety" (misspell)
    • Line 176: warning: "varity" is a misspelling of "variety" (misspell)
    • Line 179: warning: "varity" is a misspelling of "variety" (misspell)
    • Line 184: warning: "varity" is a misspelling of "variety" (misspell)