Preparing report...

Report for github.com/joaosoft/dbr

A+    Excellent!    Found 30 issues across 60 files

Tweet

gofmt86%

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!


gocyclo93%

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.

    • dbr/utils.go
    • Line 174: warning: cyclomatic complexity 26 of function loadColumnStructValues() is high (> 15) (gocyclo)
    • dbr/dbr.go
    • Line 48: warning: cyclomatic complexity 18 of function New() is high (> 15) (gocyclo)
    • dbr/handle.go
    • Line 48: warning: cyclomatic complexity 16 of function handleBuild() is high (> 15) (gocyclo)

golint63%

Golint is a linter for Go source code.

    • dbr/builder.go
    • Line 3: warning: exported type Builder should have comment or be unexported (golint)
    • dbr/consts.go
    • Line 109: warning: exported const OrderAsc should have comment (or a comment on this block) or be unexported (golint)
    • dbr/json.go
    • Line 5: warning: exported function Marshal should have comment or be unexported (golint)
    • Line 9: warning: exported function Unmarshal should have comment or be unexported (golint)
    • dbr/result.go
    • Line 4: warning: exported var NoResult should have comment or be unexported (golint)
    • Line 7: warning: exported type Result should have comment or be unexported (golint)
    • Line 9: warning: exported method Result.LastInsertId should have comment or be unexported (golint)
    • Line 13: warning: exported method Result.RowsAffected should have comment or be unexported (golint)
    • dbr/transaction.go
    • Line 8: warning: exported type Transaction should have comment or be unexported (golint)
    • Line 20: warning: exported method Transaction.Commit should have comment or be unexported (golint)
    • Line 35: warning: exported method Transaction.Rollback should have comment or be unexported (golint)
    • Line 44: warning: exported method Transaction.RollbackUnlessCommit should have comment or be unexported (golint)
    • Line 52: warning: exported method Transaction.Select should have comment or be unexported (golint)
    • Line 59: warning: exported method Transaction.Insert should have comment or be unexported (golint)
    • Line 63: warning: exported method Transaction.Update should have comment or be unexported (golint)
    • Line 67: warning: exported method Transaction.Delete should have comment or be unexported (golint)
    • Line 71: warning: exported method Transaction.Execute should have comment or be unexported (golint)
    • Line 75: warning: exported method Transaction.With should have comment or be unexported (golint)
    • Line 79: warning: exported method Transaction.WithRecursive should have comment or be unexported (golint)
    • dbr/examples/main.go
    • Line 11: warning: exported type Person should have comment or be unexported (golint)
    • Line 19: warning: exported type Address should have comment or be unexported (golint)
    • Line 86: warning: exported function Insert should have comment or be unexported (golint)
    • Line 113: warning: exported function InsertOnConflict should have comment or be unexported (golint)
    • Line 168: warning: exported function InsertValues should have comment or be unexported (golint)
    • Line 192: warning: exported function InsertRecords should have comment or be unexported (golint)
    • Line 226: warning: exported function Select should have comment or be unexported (golint)
    • Line 249: warning: exported function SelectArrayAggFilter should have comment or be unexported (golint)
    • Line 279: warning: exported function SelectArrayAgg should have comment or be unexported (golint)
    • Line 303: warning: exported function SelectExists should have comment or be unexported (golint)
    • Line 327: warning: exported function SelectMax should have comment or be unexported (golint)
    • Line 349: warning: exported function SelectOver should have comment or be unexported (golint)
    • Line 376: warning: exported function SelectCount should have comment or be unexported (golint)
    • Line 398: warning: exported function SelectCountDistinct should have comment or be unexported (golint)
    • Line 420: warning: exported function SelectAvg should have comment or be unexported (golint)
    • Line 442: warning: exported function SelectSum should have comment or be unexported (golint)
    • Line 464: warning: exported function SelectMin should have comment or be unexported (golint)
    • Line 486: warning: exported function SelectFunction should have comment or be unexported (golint)
    • Line 508: warning: exported function SelectCondition should have comment or be unexported (golint)
    • Line 530: warning: exported function SelectWithMultipleFrom should have comment or be unexported (golint)
    • Line 554: warning: exported function SelectCoalesce should have comment or be unexported (golint)
    • Line 577: warning: exported function SelectCase should have comment or be unexported (golint)
    • Line 604: warning: exported function SelectCaseWhen should have comment or be unexported (golint)
    • Line 631: warning: exported function SelectOr should have comment or be unexported (golint)
    • Line 655: warning: exported function SelectAll should have comment or be unexported (golint)
    • Line 681: warning: exported function SelectWith should have comment or be unexported (golint)
    • Line 714: warning: exported function SelectWithRecursive should have comment or be unexported (golint)
    • Line 747: warning: exported function InsertWith should have comment or be unexported (golint)
    • Line 803: warning: exported function SelectGroupBy should have comment or be unexported (golint)
    • Line 832: warning: exported function Update should have comment or be unexported (golint)
    • Line 853: warning: exported function UpdateReturning should have comment or be unexported (golint)
    • Line 878: warning: exported function Delete should have comment or be unexported (golint)
    • Line 899: warning: exported function Join should have comment or be unexported (golint)
    • Line 972: warning: exported function Execute should have comment or be unexported (golint)
    • Line 992: warning: exported function Transaction should have comment or be unexported (golint)
    • Line 1025: warning: exported function DeleteTransactionData should have comment or be unexported (golint)
    • Line 1046: warning: exported function DeleteAll should have comment or be unexported (golint)
    • dbr/event_handler.go
    • Line 7: warning: exported type SuccessEventHandler should have comment or be unexported (golint)
    • Line 8: warning: exported type ErrorEventHandler should have comment or be unexported (golint)
    • Line 10: warning: exported function NewDb should have comment or be unexported (golint)
    • dbr/stmt_delete.go
    • Line 10: warning: exported type StmtDelete should have comment or be unexported (golint)
    • Line 33: warning: exported method StmtDelete.From should have comment or be unexported (golint)
    • Line 38: warning: exported method StmtDelete.Where should have comment or be unexported (golint)
    • Line 43: warning: exported method StmtDelete.WhereOr should have comment or be unexported (golint)
    • Line 48: warning: exported method StmtDelete.Build should have comment or be unexported (golint)
    • Line 86: warning: exported method StmtDelete.Exec should have comment or be unexported (golint)
    • Line 132: warning: exported method StmtDelete.Return should have comment or be unexported (golint)
    • Line 137: warning: exported method StmtDelete.Load should have comment or be unexported (golint)
    • dbr/stmt_execute.go
    • Line 9: warning: exported type StmtExecute should have comment or be unexported (golint)
    • Line 29: warning: exported method StmtExecute.Values should have comment or be unexported (golint)
    • Line 34: warning: exported method StmtExecute.Build should have comment or be unexported (golint)
    • Line 48: warning: exported method StmtExecute.Exec should have comment or be unexported (golint)
    • dbr/stmt_insert.go
    • Line 10: warning: exported type StmtInsert should have comment or be unexported (golint)
    • Line 38: warning: exported method StmtInsert.Into should have comment or be unexported (golint)
    • Line 43: warning: exported method StmtInsert.Columns should have comment or be unexported (golint)
    • Line 48: warning: exported method StmtInsert.Values should have comment or be unexported (golint)
    • Line 53: warning: exported method StmtInsert.FromSelect should have comment or be unexported (golint)
    • Line 58: warning: exported method StmtInsert.Build should have comment or be unexported (golint)
    • Line 126: warning: exported method StmtInsert.Exec should have comment or be unexported (golint)
    • Line 166: warning: exported method StmtInsert.Record should have comment or be unexported (golint)
    • Line 190: warning: exported method StmtInsert.Records should have comment or be unexported (golint)
    • Line 198: warning: exported method StmtInsert.OnConflict should have comment or be unexported (golint)
    • Line 204: warning: exported method StmtInsert.OnConflictConstraint should have comment or be unexported (golint)
    • Line 210: warning: exported method StmtInsert.DoNothing should have comment or be unexported (golint)
    • Line 215: warning: exported method StmtInsert.DoUpdate should have comment or be unexported (golint)
    • Line 230: warning: exported method StmtInsert.Return should have comment or be unexported (golint)
    • Line 235: warning: exported method StmtInsert.Load should have comment or be unexported (golint)
    • dbr/stmt_update.go
    • Line 10: warning: exported type StmtUpdate should have comment or be unexported (golint)
    • Line 38: warning: exported method StmtUpdate.Set should have comment or be unexported (golint)
    • Line 43: warning: exported method StmtUpdate.From should have comment or be unexported (golint)
    • Line 48: warning: exported method StmtUpdate.Where should have comment or be unexported (golint)
    • Line 53: warning: exported method StmtUpdate.WhereOr should have comment or be unexported (golint)
    • Line 58: warning: exported method StmtUpdate.Build should have comment or be unexported (golint)
    • Line 99: warning: exported method StmtUpdate.Exec should have comment or be unexported (golint)
    • Line 140: warning: exported method StmtUpdate.Record should have comment or be unexported (golint)
    • Line 161: warning: exported method StmtUpdate.Return should have comment or be unexported (golint)
    • Line 166: warning: exported method StmtUpdate.Load should have comment or be unexported (golint)
    • dbr/stmt_where_exists.go
    • Line 7: warning: exported type StmtWhereExists should have comment or be unexported (golint)
    • Line 22: warning: exported method StmtWhereExists.Build should have comment or be unexported (golint)
    • dbr/errors.go
    • Line 6: warning: exported var ErrorNumberOfConditionValues should have comment or be unexported (golint)
    • dbr/stmt_with.go
    • Line 7: warning: exported type StmtWith should have comment or be unexported (golint)
    • Line 24: warning: exported method StmtWith.With should have comment or be unexported (golint)
    • Line 30: warning: exported method StmtWith.Select should have comment or be unexported (golint)
    • Line 37: warning: exported method StmtWith.Insert should have comment or be unexported (golint)
    • Line 41: warning: exported method StmtWith.Update should have comment or be unexported (golint)
    • Line 45: warning: exported method StmtWith.Delete should have comment or be unexported (golint)
    • Line 49: warning: exported method StmtWith.Build should have comment or be unexported (golint)
    • dbr/dbr.go
    • Line 13: warning: exported type Dbr should have comment or be unexported (golint)
    • Line 27: warning: exported type IDbr should have comment or be unexported (golint)
    • Line 135: warning: exported method Dbr.Select should have comment or be unexported (golint)
    • Line 142: warning: exported method Dbr.Insert should have comment or be unexported (golint)
    • Line 146: warning: exported method Dbr.Update should have comment or be unexported (golint)
    • Line 150: warning: exported method Dbr.Delete should have comment or be unexported (golint)
    • Line 154: warning: exported method Dbr.Execute should have comment or be unexported (golint)
    • Line 158: warning: exported method Dbr.With should have comment or be unexported (golint)
    • Line 162: warning: exported method Dbr.WithRecursive should have comment or be unexported (golint)
    • Line 166: warning: exported method Dbr.UseOnlyWrite should have comment or be unexported (golint)
    • Line 180: warning: exported method Dbr.UseOnlyRead should have comment or be unexported (golint)
    • Line 191: warning: exported method Dbr.Begin should have comment or be unexported (golint)
    • dbr/function.go
    • Line 26: warning: exported function Function should have comment or be unexported (golint)
    • Line 30: warning: exported function As should have comment or be unexported (golint)
    • Line 34: warning: exported function Count should have comment or be unexported (golint)
    • Line 43: warning: exported function IsNull should have comment or be unexported (golint)
    • Line 47: warning: exported function Case should have comment or be unexported (golint)
    • Line 51: warning: exported function OnNull should have comment or be unexported (golint)
    • Line 56: warning: exported function Min should have comment or be unexported (golint)
    • Line 60: warning: exported function Max should have comment or be unexported (golint)
    • Line 64: warning: exported function Sum should have comment or be unexported (golint)
    • Line 68: warning: exported function Avg should have comment or be unexported (golint)
    • Line 72: warning: exported function Every should have comment or be unexported (golint)
    • Line 76: warning: exported function Now should have comment or be unexported (golint)
    • Line 80: warning: exported function User should have comment or be unexported (golint)
    • Line 84: warning: exported function StringAgg should have comment or be unexported (golint)
    • Line 88: warning: exported function XmlAgg should have comment or be unexported (golint)
    • Line 92: warning: exported function ArrayAgg should have comment or be unexported (golint)
    • Line 96: warning: exported function ArrayToJson should have comment or be unexported (golint)
    • Line 100: warning: exported function RowToJson should have comment or be unexported (golint)
    • Line 104: warning: exported function ToJson should have comment or be unexported (golint)
    • Line 108: warning: exported function JsonArrayLength should have comment or be unexported (golint)
    • Line 112: warning: exported function JsonAgg should have comment or be unexported (golint)
    • Line 116: warning: exported function JsonbAgg should have comment or be unexported (golint)
    • Line 120: warning: exported function JsonObjectAgg should have comment or be unexported (golint)
    • Line 124: warning: exported function JsonbObjectAgg should have comment or be unexported (golint)
    • Line 128: warning: exported function Cast should have comment or be unexported (golint)
    • Line 133: warning: exported function Not should have comment or be unexported (golint)
    • Line 137: warning: exported function In should have comment or be unexported (golint)
    • Line 141: warning: exported function NotIn should have comment or be unexported (golint)
    • Line 145: warning: exported function Upper should have comment or be unexported (golint)
    • Line 149: warning: exported function Lower should have comment or be unexported (golint)
    • Line 153: warning: exported function Trim should have comment or be unexported (golint)
    • Line 157: warning: exported function Concat should have comment or be unexported (golint)
    • Line 161: warning: exported function InitCap should have comment or be unexported (golint)
    • Line 165: warning: exported function Length should have comment or be unexported (golint)
    • Line 169: warning: exported function Left should have comment or be unexported (golint)
    • Line 173: warning: exported function Right should have comment or be unexported (golint)
    • Line 177: warning: exported function Md5 should have comment or be unexported (golint)
    • Line 181: warning: exported function Replace should have comment or be unexported (golint)
    • Line 185: warning: exported function Repeat should have comment or be unexported (golint)
    • Line 189: warning: exported function Any should have comment or be unexported (golint)
    • Line 193: warning: exported function Some should have comment or be unexported (golint)
    • Line 197: warning: exported function Condition should have comment or be unexported (golint)
    • Line 201: warning: exported function Operation should have comment or be unexported (golint)
    • Line 205: warning: exported function Abs should have comment or be unexported (golint)
    • Line 209: warning: exported function Sqrt should have comment or be unexported (golint)
    • Line 213: warning: exported function Random should have comment or be unexported (golint)
    • Line 217: warning: exported function Between should have comment or be unexported (golint)
    • Line 227: warning: exported function BetweenOr should have comment or be unexported (golint)
    • Line 231: warning: exported function Over should have comment or be unexported (golint)
    • dbr/stmt_join.go
    • Line 7: warning: exported type StmtJoin should have comment or be unexported (golint)
    • Line 15: warning: exported type Join should have comment or be unexported (golint)
    • Line 26: warning: exported method StmtJoin.Build should have comment or be unexported (golint)
    • dbr/stmt_on_conflict.go
    • Line 18: warning: exported type StmtConflict should have comment or be unexported (golint)
    • Line 35: warning: exported method StmtConflict.Build should have comment or be unexported (golint)
    • dbr/stmt_select.go
    • Line 9: warning: exported type StmtSelect should have comment or be unexported (golint)
    • Line 48: warning: exported method StmtSelect.From should have comment or be unexported (golint)
    • Line 55: warning: exported method StmtSelect.Where should have comment or be unexported (golint)
    • Line 60: warning: exported method StmtSelect.WhereOr should have comment or be unexported (golint)
    • Line 65: warning: exported method StmtSelect.WhereExists should have comment or be unexported (golint)
    • Line 70: warning: exported method StmtSelect.WhereNotExists should have comment or be unexported (golint)
    • Line 75: warning: exported method StmtSelect.Join should have comment or be unexported (golint)
    • Line 86: warning: exported method StmtSelect.LeftJoin should have comment or be unexported (golint)
    • Line 97: warning: exported method StmtSelect.RightJoin should have comment or be unexported (golint)
    • Line 108: warning: exported method StmtSelect.FullJoin should have comment or be unexported (golint)
    • Line 119: warning: exported method StmtSelect.CrossJoin should have comment or be unexported (golint)
    • Line 130: warning: exported method StmtSelect.NaturalJoin should have comment or be unexported (golint)
    • Line 135: warning: exported method StmtSelect.Distinct should have comment or be unexported (golint)
    • Line 141: warning: exported method StmtSelect.DistinctOn should have comment or be unexported (golint)
    • Line 146: warning: exported method StmtSelect.Union should have comment or be unexported (golint)
    • Line 151: warning: exported method StmtSelect.UnionAll should have comment or be unexported (golint)
    • Line 156: warning: exported method StmtSelect.Intersect should have comment or be unexported (golint)
    • Line 161: warning: exported method StmtSelect.Except should have comment or be unexported (golint)
    • Line 166: warning: exported method StmtSelect.GroupBy should have comment or be unexported (golint)
    • Line 171: warning: exported method StmtSelect.Having should have comment or be unexported (golint)
    • Line 176: warning: exported method StmtSelect.HavingOr should have comment or be unexported (golint)
    • Line 181: warning: exported method StmtSelect.OrderBy should have comment or be unexported (golint)
    • Line 186: warning: exported method StmtSelect.OrderAsc should have comment or be unexported (golint)
    • Line 194: warning: exported method StmtSelect.OrderDesc should have comment or be unexported (golint)
    • Line 202: warning: exported method StmtSelect.Return should have comment or be unexported (golint)
    • Line 207: warning: exported method StmtSelect.Limit should have comment or be unexported (golint)
    • Line 212: warning: exported method StmtSelect.Offset should have comment or be unexported (golint)
    • Line 217: warning: exported method StmtSelect.Build should have comment or be unexported (golint)
    • Line 361: warning: exported method StmtSelect.Load should have comment or be unexported (golint)
    • dbr/utils.go
    • Line 17: warning: exported function GetEnv should have comment or be unexported (golint)
    • Line 26: warning: exported function Exists should have comment or be unexported (golint)
    • Line 35: warning: exported function ReadFile should have comment or be unexported (golint)
    • Line 61: warning: exported function ReadFileLines should have comment or be unexported (golint)
    • Line 86: warning: exported function WriteFile should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign98%

IneffAssign detects ineffectual assignments in Go code.


misspell98%

Misspell Finds commonly misspelled English words