Preparing report...

Report for github.com/wzshiming/gs

A+    Excellent!    Found 36 issues across 75 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!


gocyclo92%

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.


golint72%

Golint is a linter for Go source code.

    • gs/value/value_tuple.go
    • Line 10: warning: exported function NewTuple should have comment or be unexported (golint)
    • Line 24: warning: exported type Tuple should have comment or be unexported (golint)
    • Line 45: warning: exported method Tuple.Point should have comment or be unexported (golint)
    • Line 49: warning: exported method Tuple.Len should have comment or be unexported (golint)
    • Line 53: warning: exported method Tuple.Index should have comment or be unexported (golint)
    • Line 57: warning: exported method Tuple.Binary should have comment or be unexported (golint)
    • Line 112: warning: exported method Tuple.UnaryPre should have comment or be unexported (golint)
    • Line 116: warning: exported method Tuple.UnarySuf should have comment or be unexported (golint)
    • gs/errors/errors.go
    • Line 10: warning: exported type Error should have comment or be unexported (golint)
    • Line 23: warning: exported function NewErrors should have comment or be unexported (golint)
    • Line 27: warning: exported type Errors should have comment or be unexported (golint)
    • Line 29: warning: exported method Errors.Reset should have comment or be unexported (golint)
    • Line 33: warning: exported method Errors.Append should have comment or be unexported (golint)
    • Line 52: warning: exported method Errors.Len should have comment or be unexported (golint)
    • gs/scanner/scanner.go
    • Line 10: warning: exported type Scanner should have comment or be unexported (golint)
    • Line 17: warning: exported function NewScanner should have comment or be unexported (golint)
    • Line 26: warning: exported method Scanner.SkipError should have comment or be unexported (golint)
    • Line 61: warning: exported method Scanner.Scan should have comment or be unexported (golint)
    • gs/value/value.go
    • Line 9: warning: error var undefined should have name of the form errFoo (golint)
    • Line 11: warning: exported type Value should have comment or be unexported (golint)
    • gs/token/token.go
    • Line 7: warning: exported type Token should have comment or be unexported (golint)
    • Line 10: warning: exported const INVALID should have comment (or a comment on this block) or be unexported (golint)
    • Line 186: warning: exported method Token.Precedence should have comment or be unexported (golint)
    • Line 190: warning: exported method Token.IsLiteral should have comment or be unexported (golint)
    • Line 190: warning: receiver name t should be consistent with previous receiver name op for Token (golint)
    • Line 194: warning: exported method Token.IsKeywork should have comment or be unexported (golint)
    • Line 194: warning: receiver name t should be consistent with previous receiver name op for Token (golint)
    • Line 198: warning: exported method Token.IsOperator should have comment or be unexported (golint)
    • Line 198: warning: receiver name t should be consistent with previous receiver name op for Token (golint)
    • gs/exec/exec.go
    • Line 13: warning: exported type Exec should have comment or be unexported (golint)
    • Line 19: warning: exported function NewExec should have comment or be unexported (golint)
    • Line 31: warning: exported method Exec.Parse should have comment or be unexported (golint)
    • Line 40: warning: exported method Exec.Cmd should have comment or be unexported (golint)
    • gs/value/value_bool.go
    • Line 13: warning: exported type Bool should have comment or be unexported (golint)
    • Line 22: warning: exported method Bool.Point should have comment or be unexported (golint)
    • Line 26: warning: exported method Bool.Binary should have comment or be unexported (golint)
    • Line 30: warning: exported method Bool.UnaryPre should have comment or be unexported (golint)
    • Line 34: warning: exported method Bool.UnarySuf should have comment or be unexported (golint)
    • gs/value/value_map.go
    • Line 13: warning: exported type Map should have comment or be unexported (golint)
    • Line 31: warning: exported method Map.Point should have comment or be unexported (golint)
    • Line 35: warning: exported method Map.Set should have comment or be unexported (golint)
    • Line 39: warning: exported method Map.SetLocal should have comment or be unexported (golint)
    • Line 43: warning: exported method Map.Get should have comment or be unexported (golint)
    • Line 48: warning: exported method Map.Child should have comment or be unexported (golint)
    • Line 52: warning: exported method Map.Binary should have comment or be unexported (golint)
    • Line 56: warning: exported method Map.UnaryPre should have comment or be unexported (golint)
    • Line 60: warning: exported method Map.UnarySuf should have comment or be unexported (golint)
    • gs/value/value_var.go
    • Line 7: warning: exported type Var should have comment or be unexported (golint)
    • Line 21: warning: exported method Var.Point should have comment or be unexported (golint)
    • Line 29: warning: exported method Var.Binary should have comment or be unexported (golint)
    • Line 55: warning: exported method Var.UnaryPre should have comment or be unexported (golint)
    • Line 66: warning: exported method Var.UnarySuf should have comment or be unexported (golint)
    • gs/position/position.go
    • Line 1: warning: package comment should be of the form "Package position ..." (golint)
    • Line 72: warning: comment on exported const NoPos should be of the form "NoPos ..." (golint)
    • Line 84: warning: exported method Pos.GetPos should have comment or be unexported (golint)
    • gs/value/scope.go
    • Line 3: warning: exported type Scope should have comment or be unexported (golint)
    • Line 8: warning: exported function NewScope should have comment or be unexported (golint)
    • Line 14: warning: exported method Scope.Child should have comment or be unexported (golint)
    • Line 18: warning: exported method Scope.Get should have comment or be unexported (golint)
    • Line 40: warning: exported method Scope.Set should have comment or be unexported (golint)
    • Line 50: warning: exported method Scope.SetLocal should have comment or be unexported (golint)
    • gs/value/value_number.go
    • Line 8: warning: exported type Number should have comment or be unexported (golint)
    • Line 14: warning: exported function ParseNumber should have comment or be unexported (golint)
    • gs/printer/printer.go
    • Line 14: warning: exported type Printer should have comment or be unexported (golint)
    • Line 21: warning: exported function NewPrinter should have comment or be unexported (golint)
    • Line 29: warning: exported method Printer.Format should have comment or be unexported (golint)
    • Line 58: warning: exported method Printer.Print should have comment or be unexported (golint)
    • gs/value/value_func.go
    • Line 8: warning: exported type Func should have comment or be unexported (golint)
    • Line 18: warning: exported method Func.Point should have comment or be unexported (golint)
    • Line 22: warning: exported method Func.Binary should have comment or be unexported (golint)
    • Line 26: warning: exported method Func.UnaryPre should have comment or be unexported (golint)
    • Line 30: warning: exported method Func.UnarySuf should have comment or be unexported (golint)
    • gs/value/value_func_builtin.go
    • Line 10: warning: exported type FuncBuiltin should have comment or be unexported (golint)
    • Line 14: warning: exported function NewFuncBuiltin should have comment or be unexported (golint)
    • Line 20: warning: exported method FuncBuiltin.Call should have comment or be unexported (golint)
    • Line 58: warning: exported method FuncBuiltin.Point should have comment or be unexported (golint)
    • Line 62: warning: exported method FuncBuiltin.Binary should have comment or be unexported (golint)
    • Line 66: warning: exported method FuncBuiltin.UnaryPre should have comment or be unexported (golint)
    • Line 70: warning: exported method FuncBuiltin.UnarySuf should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign70%

IneffAssign detects ineffectual assignments in Go code.

    • gs/value/value_func.go
    • Line 4: warning: cannot find package "." in: (ineffassign)
    • Line 4: warning: could not import github.com/wzshiming/gs/ast (invalid package name: "") (ineffassign)
    • gs/ast/ast_binary.go
    • Line 5: warning: cannot find package "." in: (ineffassign)
    • Line 5: warning: could not import github.com/wzshiming/gs/token (invalid package name: "") (ineffassign)
    • gs/printer/printer.go
    • Line 8: warning: cannot find package "." in: (ineffassign)
    • Line 9: warning: cannot find package "." in: (ineffassign)
    • Line 10: warning: cannot find package "." in: (ineffassign)
    • Line 11: warning: cannot find package "." in: (ineffassign)
    • Line 8: warning: could not import github.com/wzshiming/gs/ast (invalid package name: "") (ineffassign)
    • Line 9: warning: could not import github.com/wzshiming/gs/errors (invalid package name: "") (ineffassign)
    • Line 10: warning: could not import github.com/wzshiming/gs/parser (invalid package name: "") (ineffassign)
    • Line 11: warning: could not import github.com/wzshiming/gs/position (invalid package name: "") (ineffassign)
    • gs/evaluator/evaluator.go
    • Line 6: warning: cannot find package "." in: (ineffassign)
    • Line 7: warning: cannot find package "." in: (ineffassign)
    • Line 8: warning: cannot find package "." in: (ineffassign)
    • Line 9: warning: cannot find package "." in: (ineffassign)
    • Line 6: warning: could not import github.com/wzshiming/gs/ast (invalid package name: "") (ineffassign)
    • Line 7: warning: could not import github.com/wzshiming/gs/errors (invalid package name: "") (ineffassign)
    • Line 8: warning: could not import github.com/wzshiming/gs/position (invalid package name: "") (ineffassign)
    • Line 9: warning: could not import github.com/wzshiming/gs/value (invalid package name: "") (ineffassign)
    • gs/scanner/scanner.go
    • Line 6: warning: cannot find package "." in: (ineffassign)
    • Line 7: warning: cannot find package "." in: (ineffassign)
    • Line 6: warning: could not import github.com/wzshiming/gs/position (invalid package name: "") (ineffassign)
    • Line 7: warning: could not import github.com/wzshiming/gs/token (invalid package name: "") (ineffassign)
    • Line 67: warning: s.scanString undefined (type *Scanner has no field or method scanString) (ineffassign)
    • Line 6: warning: could not import github.com/wzshiming/gs/position (invalid package name: "") (ineffassign)
    • Line 7: warning: could not import github.com/wzshiming/gs/token (invalid package name: "") (ineffassign)
    • Line 67: warning: s.scanString undefined (type *Scanner has no field or method scanString) (ineffassign)
    • gs/value/value.go
    • Line 6: warning: cannot find package "." in: (ineffassign)
    • Line 6: warning: could not import github.com/wzshiming/gs/token (invalid package name: "") (ineffassign)
    • gs/exec/exec.go
    • Line 4: warning: cannot find package "." in: (ineffassign)
    • Line 5: warning: cannot find package "." in: (ineffassign)
    • Line 6: warning: cannot find package "." in: (ineffassign)
    • Line 7: warning: cannot find package "." in: (ineffassign)
    • Line 8: warning: cannot find package "." in: (ineffassign)
    • Line 9: warning: cannot find package "." in: (ineffassign)
    • Line 10: warning: cannot find package "." in: (ineffassign)
    • Line 4: warning: could not import github.com/wzshiming/gs/ast (invalid package name: "") (ineffassign)
    • Line 5: warning: could not import github.com/wzshiming/gs/builtin (invalid package name: "") (ineffassign)
    • Line 6: warning: could not import github.com/wzshiming/gs/errors (invalid package name: "") (ineffassign)
    • Line 7: warning: could not import github.com/wzshiming/gs/evaluator (invalid package name: "") (ineffassign)
    • Line 8: warning: could not import github.com/wzshiming/gs/parser (invalid package name: "") (ineffassign)
    • Line 9: warning: could not import github.com/wzshiming/gs/position (invalid package name: "") (ineffassign)
    • Line 10: warning: could not import github.com/wzshiming/gs/value (invalid package name: "") (ineffassign)
    • gs/cmd/gsfmt/main.go
    • Line 9: warning: cannot find package "." in: (ineffassign)
    • Line 9: warning: could not import github.com/wzshiming/gs/format (invalid package name: "") (ineffassign)
    • gs/cmd/gs/main.go
    • Line 11: warning: cannot find package "." in: (ineffassign)
    • Line 11: warning: could not import github.com/wzshiming/gs/exec (invalid package name: "") (ineffassign)
    • gs/parser/parser.go
    • Line 6: warning: cannot find package "." in: (ineffassign)
    • Line 7: warning: cannot find package "." in: (ineffassign)
    • Line 8: warning: cannot find package "." in: (ineffassign)
    • Line 9: warning: cannot find package "." in: (ineffassign)
    • Line 10: warning: cannot find package "." in: (ineffassign)
    • Line 6: warning: could not import github.com/wzshiming/gs/ast (invalid package name: "") (ineffassign)
    • Line 7: warning: could not import github.com/wzshiming/gs/errors (invalid package name: "") (ineffassign)
    • Line 8: warning: could not import github.com/wzshiming/gs/position (invalid package name: "") (ineffassign)
    • Line 9: warning: could not import github.com/wzshiming/gs/scanner (invalid package name: "") (ineffassign)
    • Line 10: warning: could not import github.com/wzshiming/gs/token (invalid package name: "") (ineffassign)
    • gs/builtin/func.go
    • Line 6: warning: cannot find package "." in: (ineffassign)
    • Line 6: warning: could not import github.com/wzshiming/gs/value (invalid package name: "") (ineffassign)
    • gs/errors/errors.go
    • Line 7: warning: cannot find package "." in: (ineffassign)
    • Line 7: warning: could not import github.com/wzshiming/gs/position (invalid package name: "") (ineffassign)
    • gs/examples/test/parser_test.go
    • Line 6: warning: cannot find package "." in: (ineffassign)
    • Line 7: warning: cannot find package "." in: (ineffassign)
    • Line 8: warning: cannot find package "." in: (ineffassign)
    • Line 9: warning: cannot find package "." in: (ineffassign)
    • Line 6: warning: could not import github.com/wzshiming/gs/errors (invalid package name: "") (ineffassign)
    • Line 7: warning: could not import github.com/wzshiming/gs/parser (invalid package name: "") (ineffassign)
    • Line 8: warning: could not import github.com/wzshiming/gs/position (invalid package name: "") (ineffassign)
    • Line 9: warning: could not import gopkg.in/ffmt.v1 (invalid package name: "") (ineffassign)
    • gs/ast/ast.go
    • Line 4: warning: cannot find package "." in: (ineffassign)
    • Line 4: warning: could not import github.com/wzshiming/gs/position (invalid package name: "") (ineffassign)
    • gs/format/format.go
    • Line 6: warning: cannot find package "." in: (ineffassign)
    • Line 6: warning: could not import github.com/wzshiming/gs/printer (invalid package name: "") (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!