Preparing report...

Report for github.com/9072997/sqlTransform

A+    Excellent!    Found 15 issues across 24 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!


gocyclo75%

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.

    • sqlTransform/sqlparser/token.go
    • Line 141: warning: cyclomatic complexity 31 of function (*Tokenizer).Scan() is high (> 15) (gocyclo)
    • Line 297: warning: cyclomatic complexity 16 of function (*Tokenizer).scanNumber() is high (> 15) (gocyclo)

golint54%

Golint is a linter for Go source code.

    • sqlTransform/util/file_helpers.go
    • Line 12: warning: exported function IsPathDir should have comment or be unexported (golint)
    • Line 30: warning: exported function OpenFileOrStdDev should have comment or be unexported (golint)
    • Line 65: warning: exported function CleanPath should have comment or be unexported (golint)
    • Line 94: warning: exported function RewindFile should have comment or be unexported (golint)
    • Line 102: warning: exported function IsThereDataOnStdin should have comment or be unexported (golint)
    • Line 111: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 116: warning: exported function AllFilesInDirectory should have comment or be unexported (golint)
    • sqlTransform/sqlparser/tracked_buffer.go
    • Line 25: warning: exported function NewTrackedBuffer should have comment or be unexported (golint)
    • Line 101: warning: exported method TrackedBuffer.ParsedQuery should have comment or be unexported (golint)
    • Line 105: warning: exported method TrackedBuffer.HasBindVars should have comment or be unexported (golint)
    • sqlTransform/sqlparser/token.go
    • Line 15: warning: exported const EOFCHAR should have comment or be unexported (golint)
    • Line 172: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 190: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 214: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 221: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 417: warning: exported method Tokenizer.ConsumeNext should have comment or be unexported (golint)
    • sqlTransform/sqlparser/sqltypes/sqltypes.go
    • Line 20: warning: exported var NULL should have comment or be unexported (golint)
    • Line 151: warning: exported method Value.IsNull should have comment or be unexported (golint)
    • Line 155: warning: exported method Value.IsNumeric should have comment or be unexported (golint)
    • Line 162: warning: exported method Value.IsFractional should have comment or be unexported (golint)
    • Line 169: warning: exported method Value.IsString should have comment or be unexported (golint)
    • Line 220: warning: exported function BuildValue should have comment or be unexported (golint)
    • Line 290: warning: exported method Numeric.MarshalJSON should have comment or be unexported (golint)
    • Line 310: warning: exported method String.MarshalJSON should have comment or be unexported (golint)
    • sqlTransform/sqlparser/ast.go
    • Line 56: warning: exported method Union.IStatement should have comment or be unexported (golint)
    • Line 57: warning: exported method Select.IStatement should have comment or be unexported (golint)
    • Line 58: warning: exported method Insert.IStatement should have comment or be unexported (golint)
    • Line 59: warning: exported method Update.IStatement should have comment or be unexported (golint)
    • Line 60: warning: exported method Delete.IStatement should have comment or be unexported (golint)
    • Line 61: warning: exported method Set.IStatement should have comment or be unexported (golint)
    • Line 62: warning: exported method DDL.IStatement should have comment or be unexported (golint)
    • Line 63: warning: exported method Other.IStatement should have comment or be unexported (golint)
    • Line 73: warning: exported method Select.ISelectStatement should have comment or be unexported (golint)
    • Line 74: warning: exported method Union.ISelectStatement should have comment or be unexported (golint)
    • Line 101: warning: exported method Select.Format should have comment or be unexported (golint)
    • Line 124: warning: exported method Union.Format should have comment or be unexported (golint)
    • Line 137: warning: exported method Insert.Format should have comment or be unexported (golint)
    • Line 149: warning: exported method Select.IInsertRows should have comment or be unexported (golint)
    • Line 150: warning: exported method Union.IInsertRows should have comment or be unexported (golint)
    • Line 151: warning: exported method Values.IInsertRows should have comment or be unexported (golint)
    • Line 163: warning: exported method Update.Format should have comment or be unexported (golint)
    • Line 178: warning: exported method Delete.Format should have comment or be unexported (golint)
    • Line 190: warning: exported method Set.Format should have comment or be unexported (golint)
    • Line 204: warning: exported const AST_CREATE should have comment (or a comment on this block) or be unexported (golint)
    • Line 210: warning: exported method DDL.Format should have comment or be unexported (golint)
    • Line 226: warning: exported method Other.Format should have comment or be unexported (golint)
    • Line 233: warning: exported method Comments.Format should have comment or be unexported (golint)
    • Line 242: warning: exported method SelectExprs.Format should have comment or be unexported (golint)
    • Line 256: warning: exported method StarExpr.ISelectExpr should have comment or be unexported (golint)
    • Line 257: warning: exported method NonStarExpr.ISelectExpr should have comment or be unexported (golint)
    • Line 264: warning: exported method StarExpr.Format should have comment or be unexported (golint)
    • Line 277: warning: exported method NonStarExpr.Format should have comment or be unexported (golint)
    • Line 290: warning: exported method Columns.Format should have comment or be unexported (golint)
    • Line 300: warning: exported method TableExprs.Format should have comment or be unexported (golint)
    • Line 314: warning: exported method AliasedTableExpr.ITableExpr should have comment or be unexported (golint)
    • Line 315: warning: exported method ParenTableExpr.ITableExpr should have comment or be unexported (golint)
    • Line 316: warning: exported method JoinTableExpr.ITableExpr should have comment or be unexported (golint)
    • Line 326: warning: exported method AliasedTableExpr.Format should have comment or be unexported (golint)
    • Line 343: warning: exported method TableName.ISimpleTableExpr should have comment or be unexported (golint)
    • Line 344: warning: exported method Subquery.ISimpleTableExpr should have comment or be unexported (golint)
    • Line 351: warning: exported method TableName.Format should have comment or be unexported (golint)
    • Line 364: warning: exported method ParenTableExpr.Format should have comment or be unexported (golint)
    • Line 386: warning: exported method JoinTableExpr.Format should have comment or be unexported (golint)
    • Line 400: warning: exported const AST_USE should have comment (or a comment on this block) or be unexported (golint)
    • Line 405: warning: exported method IndexHints.Format should have comment or be unexported (golint)
    • Line 436: warning: exported method Where.Format should have comment or be unexported (golint)
    • Line 463: warning: exported method From.Format should have comment or be unexported (golint)
    • Line 476: warning: exported method AndExpr.IExpr should have comment or be unexported (golint)
    • Line 477: warning: exported method OrExpr.IExpr should have comment or be unexported (golint)
    • Line 478: warning: exported method NotExpr.IExpr should have comment or be unexported (golint)
    • Line 479: warning: exported method ParenBoolExpr.IExpr should have comment or be unexported (golint)
    • Line 480: warning: exported method ComparisonExpr.IExpr should have comment or be unexported (golint)
    • Line 481: warning: exported method RangeCond.IExpr should have comment or be unexported (golint)
    • Line 482: warning: exported method NullCheck.IExpr should have comment or be unexported (golint)
    • Line 483: warning: exported method ExistsExpr.IExpr should have comment or be unexported (golint)
    • Line 484: warning: exported method KeyrangeExpr.IExpr should have comment or be unexported (golint)
    • Line 485: warning: exported method StrVal.IExpr should have comment or be unexported (golint)
    • Line 486: warning: exported method NumVal.IExpr should have comment or be unexported (golint)
    • Line 487: warning: exported method ValArg.IExpr should have comment or be unexported (golint)
    • Line 488: warning: exported method NullVal.IExpr should have comment or be unexported (golint)
    • Line 489: warning: exported method ColName.IExpr should have comment or be unexported (golint)
    • Line 490: warning: exported method ValTuple.IExpr should have comment or be unexported (golint)
    • Line 491: warning: exported method Subquery.IExpr should have comment or be unexported (golint)
    • Line 492: warning: exported method ListArg.IExpr should have comment or be unexported (golint)
    • Line 493: warning: exported method BinaryExpr.IExpr should have comment or be unexported (golint)
    • Line 494: warning: exported method UnaryExpr.IExpr should have comment or be unexported (golint)
    • Line 495: warning: exported method FuncExpr.IExpr should have comment or be unexported (golint)
    • Line 496: warning: exported method CaseExpr.IExpr should have comment or be unexported (golint)
    • Line 504: warning: exported method AndExpr.IBoolExpr should have comment or be unexported (golint)
    • Line 505: warning: exported method OrExpr.IBoolExpr should have comment or be unexported (golint)
    • Line 506: warning: exported method NotExpr.IBoolExpr should have comment or be unexported (golint)
    • Line 507: warning: exported method ParenBoolExpr.IBoolExpr should have comment or be unexported (golint)
    • Line 508: warning: exported method ComparisonExpr.IBoolExpr should have comment or be unexported (golint)
    • Line 509: warning: exported method RangeCond.IBoolExpr should have comment or be unexported (golint)
    • Line 510: warning: exported method NullCheck.IBoolExpr should have comment or be unexported (golint)
    • Line 511: warning: exported method ExistsExpr.IBoolExpr should have comment or be unexported (golint)
    • Line 512: warning: exported method KeyrangeExpr.IBoolExpr should have comment or be unexported (golint)
    • Line 519: warning: exported method AndExpr.Format should have comment or be unexported (golint)
    • Line 528: warning: exported method OrExpr.Format should have comment or be unexported (golint)
    • Line 537: warning: exported method NotExpr.Format should have comment or be unexported (golint)
    • Line 546: warning: exported method ParenBoolExpr.Format should have comment or be unexported (golint)
    • Line 571: warning: exported method ComparisonExpr.Format should have comment or be unexported (golint)
    • Line 588: warning: exported method RangeCond.Format should have comment or be unexported (golint)
    • Line 604: warning: exported method NullCheck.Format should have comment or be unexported (golint)
    • Line 613: warning: exported method ExistsExpr.Format should have comment or be unexported (golint)
    • Line 622: warning: exported method KeyrangeExpr.Format should have comment or be unexported (golint)
    • Line 632: warning: exported method StrVal.IValExpr should have comment or be unexported (golint)
    • Line 633: warning: exported method NumVal.IValExpr should have comment or be unexported (golint)
    • Line 634: warning: exported method ValArg.IValExpr should have comment or be unexported (golint)
    • Line 635: warning: exported method NullVal.IValExpr should have comment or be unexported (golint)
    • Line 636: warning: exported method ColName.IValExpr should have comment or be unexported (golint)
    • Line 637: warning: exported method ValTuple.IValExpr should have comment or be unexported (golint)
    • Line 638: warning: exported method Subquery.IValExpr should have comment or be unexported (golint)
    • Line 639: warning: exported method ListArg.IValExpr should have comment or be unexported (golint)
    • Line 640: warning: exported method BinaryExpr.IValExpr should have comment or be unexported (golint)
    • Line 641: warning: exported method UnaryExpr.IValExpr should have comment or be unexported (golint)
    • Line 642: warning: exported method FuncExpr.IValExpr should have comment or be unexported (golint)
    • Line 643: warning: exported method CaseExpr.IValExpr should have comment or be unexported (golint)
    • Line 648: warning: exported method StrVal.Format should have comment or be unexported (golint)
    • Line 656: warning: exported method NumVal.Format should have comment or be unexported (golint)
    • Line 663: warning: exported method ValArg.Format should have comment or be unexported (golint)
    • Line 670: warning: exported method NullVal.Format should have comment or be unexported (golint)
    • Line 679: warning: exported method ColName.Format should have comment or be unexported (golint)
    • Line 702: warning: exported method ValTuple.IColTuple should have comment or be unexported (golint)
    • Line 703: warning: exported method Subquery.IColTuple should have comment or be unexported (golint)
    • Line 704: warning: exported method ListArg.IColTuple should have comment or be unexported (golint)
    • Line 709: warning: exported method ValTuple.Format should have comment or be unexported (golint)
    • Line 717: warning: exported method ValExprs.Format should have comment or be unexported (golint)
    • Line 730: warning: exported method Subquery.Format should have comment or be unexported (golint)
    • Line 737: warning: exported method ListArg.Format should have comment or be unexported (golint)
    • Line 759: warning: exported method BinaryExpr.Format should have comment or be unexported (golint)
    • Line 776: warning: exported method UnaryExpr.Format should have comment or be unexported (golint)
    • Line 787: warning: exported method FuncExpr.Format should have comment or be unexported (golint)
    • Line 815: warning: exported method FuncExpr.IsAggregate should have comment or be unexported (golint)
    • Line 826: warning: exported method CaseExpr.Format should have comment or be unexported (golint)
    • Line 846: warning: exported method When.Format should have comment or be unexported (golint)
    • Line 853: warning: exported method GroupBy.Format should have comment or be unexported (golint)
    • Line 864: warning: exported method OrderBy.Format should have comment or be unexported (golint)
    • Line 884: warning: exported method Order.Format should have comment or be unexported (golint)
    • Line 893: warning: exported method Limit.Format should have comment or be unexported (golint)
    • Line 950: warning: exported method Values.Format should have comment or be unexported (golint)
    • Line 964: warning: exported method ValTuple.IRowTuple should have comment or be unexported (golint)
    • Line 965: warning: exported method Subquery.IRowTuple should have comment or be unexported (golint)
    • Line 970: warning: exported method UpdateExprs.Format should have comment or be unexported (golint)
    • Line 984: warning: exported method UpdateExpr.Format should have comment or be unexported (golint)
    • Line 991: warning: exported method OnDup.Format should have comment or be unexported (golint)
    • sqlTransform/sqlparser/parsed_query.go
    • Line 20: warning: exported type ParsedQuery should have comment or be unexported (golint)
    • Line 25: warning: exported type EncoderFunc should have comment or be unexported (golint)
    • Line 27: warning: exported method ParsedQuery.GenerateQuery should have comment or be unexported (golint)
    • Line 49: warning: exported method ParsedQuery.MarshalJSON should have comment or be unexported (golint)
    • Line 53: warning: exported function EncodeValue should have comment or be unexported (golint)
    • Line 102: warning: exported type TupleEqualityList should have comment or be unexported (golint)
    • Line 107: warning: exported method TupleEqualityList.Encode should have comment or be unexported (golint)
    • Line 156: warning: exported function FetchBindVar should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign95%

IneffAssign detects ineffectual assignments in Go code.


misspell87%

Misspell Finds commonly misspelled English words