Preparing report...

Report for github.com/cznic/ql

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


golint100%

Golint is a linter for Go source code.

No problems detected. Good job!


gocyclo45%

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.

    • ql/expr.go
    • Line 530: warning: cyclomatic complexity 1083 of function (*binaryOperation).eval() is high (> 15) (gocyclo)
    • Line 3436: warning: cyclomatic complexity 83 of function (*unaryOperation).eval() is high (> 15) (gocyclo)
    • Line 333: warning: cyclomatic complexity 27 of function newBinaryOperation0() is high (> 15) (gocyclo)
    • Line 80: warning: cyclomatic complexity 23 of function mentionedColumns0() is high (> 15) (gocyclo)
    • Line 3186: warning: cyclomatic complexity 20 of function (*pIn).eval() is high (> 15) (gocyclo)
    • Line 429: warning: cyclomatic complexity 16 of function newBinaryOperation() is high (> 15) (gocyclo)
    • Line 3357: warning: cyclomatic complexity 16 of function newUnaryOperation() is high (> 15) (gocyclo)
    • ql/coerce.go
    • Line 48: warning: cyclomatic complexity 101 of function coerce1() is high (> 15) (gocyclo)
    • ql/file.go
    • Line 259: warning: cyclomatic complexity 35 of function infer() is high (> 15) (gocyclo)
    • Line 841: warning: cyclomatic complexity 27 of function (*file).Read() is high (> 15) (gocyclo)
    • Line 451: warning: cyclomatic complexity 26 of function newFileFromOSFile() is high (> 15) (gocyclo)
    • Line 73: warning: cyclomatic complexity 18 of function OpenFile() is high (> 15) (gocyclo)
    • Line 957: warning: cyclomatic complexity 17 of function (*file).loadChunks() is high (> 15) (gocyclo)
    • Line 1064: warning: cyclomatic complexity 17 of function (*file).flatten() is high (> 15) (gocyclo)
    • ql/helper/helper.go
    • Line 49: warning: cyclomatic complexity 26 of function (t).String() is high (> 15) (gocyclo)
    • Line 191: warning: cyclomatic complexity 17 of function coerceIdealUint() is high (> 15) (gocyclo)
    • Line 131: warning: cyclomatic complexity 17 of function coerceIdealInt() is high (> 15) (gocyclo)
    • ql/introspection.go
    • Line 93: warning: cyclomatic complexity 61 of function StructSchema() is high (> 15) (gocyclo)
    • Line 344: warning: cyclomatic complexity 24 of function Schema() is high (> 15) (gocyclo)
    • Line 549: warning: cyclomatic complexity 20 of function Unmarshal() is high (> 15) (gocyclo)
    • ql/ql.go
    • Line 350: warning: cyclomatic complexity 31 of function (*whereRset).planBinOp() is high (> 15) (gocyclo)
    • Line 1293: warning: cyclomatic complexity 25 of function (*DB).run1() is high (> 15) (gocyclo)
    • Line 1732: warning: cyclomatic complexity 24 of function (*joinRset).plan() is high (> 15) (gocyclo)
    • Line 769: warning: cyclomatic complexity 22 of function (*col).typeCheck() is high (> 15) (gocyclo)
    • Line 620: warning: cyclomatic complexity 22 of function (*selectRset).plan() is high (> 15) (gocyclo)
    • Line 843: warning: cyclomatic complexity 19 of function newDB() is high (> 15) (gocyclo)
    • ql/file2.go
    • Line 98: warning: cyclomatic complexity 26 of function newStorage2() is high (> 15) (gocyclo)
    • Line 445: warning: cyclomatic complexity 16 of function (*storage2).Update() is high (> 15) (gocyclo)
    • ql/go1.8_test.go
    • Line 11: warning: cyclomatic complexity 19 of function TestMultiResultSet() is high (> 15) (gocyclo)
    • Line 77: warning: cyclomatic complexity 16 of function TestNamedArgs() is high (> 15) (gocyclo)
    • ql/introspection_test.go
    • Line 301: warning: cyclomatic complexity 94 of function TestMarshal() is high (> 15) (gocyclo)
    • Line 812: warning: cyclomatic complexity 20 of function TestUnmarshal0() is high (> 15) (gocyclo)
    • ql/encode2.go
    • Line 262: warning: cyclomatic complexity 74 of function decode2() is high (> 15) (gocyclo)
    • Line 56: warning: cyclomatic complexity 62 of function encode2() is high (> 15) (gocyclo)
    • ql/builtin.go
    • Line 109: warning: cyclomatic complexity 32 of function builtinAvg() is high (> 15) (gocyclo)
    • Line 659: warning: cyclomatic complexity 32 of function builtinMin() is high (> 15) (gocyclo)
    • Line 579: warning: cyclomatic complexity 32 of function builtinMax() is high (> 15) (gocyclo)
    • Line 897: warning: cyclomatic complexity 20 of function builtinSum() is high (> 15) (gocyclo)
    • Line 199: warning: cyclomatic complexity 19 of function builtinComplex() is high (> 15) (gocyclo)
    • Line 370: warning: cyclomatic complexity 17 of function builtinFormatFloat() is high (> 15) (gocyclo)
    • Line 427: warning: cyclomatic complexity 16 of function builtinFormatInt() is high (> 15) (gocyclo)
    • ql/mem.go
    • Line 369: warning: cyclomatic complexity 31 of function (*mem).clone() is high (> 15) (gocyclo)
    • Line 766: warning: cyclomatic complexity 17 of function (*xtree).delete() is high (> 15) (gocyclo)
    • ql/plan.go
    • Line 917: warning: cyclomatic complexity 29 of function (*indexPlan).filterCC() is high (> 15) (gocyclo)
    • Line 1282: warning: cyclomatic complexity 26 of function (*indexPlan).filter() is high (> 15) (gocyclo)
    • Line 1144: warning: cyclomatic complexity 25 of function (*indexPlan).filterCO() is high (> 15) (gocyclo)
    • Line 1004: warning: cyclomatic complexity 24 of function (*indexPlan).filterOC() is high (> 15) (gocyclo)
    • Line 2701: warning: cyclomatic complexity 22 of function (*fullJoinDefaultPlan).do() is high (> 15) (gocyclo)
    • Line 1609: warning: cyclomatic complexity 20 of function (*groupByDefaultPlan).do() is high (> 15) (gocyclo)
    • Line 1082: warning: cyclomatic complexity 19 of function (*indexPlan).filterOO() is high (> 15) (gocyclo)
    • Line 1222: warning: cyclomatic complexity 17 of function (*indexPlan).filterNe() is high (> 15) (gocyclo)
    • Line 1875: warning: cyclomatic complexity 17 of function (*orderByDefaultPlan).do() is high (> 15) (gocyclo)
    • Line 714: warning: cyclomatic complexity 17 of function (*indexPlan).filterGe() is high (> 15) (gocyclo)
    • Line 814: warning: cyclomatic complexity 17 of function (*indexPlan).filterLe() is high (> 15) (gocyclo)
    • Line 2015: warning: cyclomatic complexity 16 of function (*selectFieldsGroupPlan).do() is high (> 15) (gocyclo)
    • Line 630: warning: cyclomatic complexity 16 of function (*indexPlan).explain() is high (> 15) (gocyclo)
    • Line 594: warning: cyclomatic complexity 16 of function (*indexPlan).do() is high (> 15) (gocyclo)
    • ql/all_test.go
    • Line 3975: warning: cyclomatic complexity 28 of function TestSelectDummy() is high (> 15) (gocyclo)
    • Line 3089: warning: cyclomatic complexity 26 of function testMentionedColumns() is high (> 15) (gocyclo)
    • Line 3806: warning: cyclomatic complexity 21 of function TestIssue190() is high (> 15) (gocyclo)
    • Line 1364: warning: cyclomatic complexity 19 of function benchmarkInsertBool() is high (> 15) (gocyclo)
    • Line 1567: warning: cyclomatic complexity 18 of function benchmarkSelectBool() is high (> 15) (gocyclo)
    • Line 747: warning: cyclomatic complexity 18 of function testReopen() is high (> 15) (gocyclo)
    • Line 1023: warning: cyclomatic complexity 17 of function TestRowsAffected() is high (> 15) (gocyclo)
    • Line 2347: warning: cyclomatic complexity 17 of function testIssue50() is high (> 15) (gocyclo)
    • Line 1972: warning: cyclomatic complexity 16 of function benchmarkCrossJoin() is high (> 15) (gocyclo)
    • ql/storage.go
    • Line 363: warning: cyclomatic complexity 27 of function (*table).load() is high (> 15) (gocyclo)
    • Line 918: warning: cyclomatic complexity 22 of function (*root).dropTable() is high (> 15) (gocyclo)
    • Line 205: warning: cyclomatic complexity 20 of function (*table).checkConstraintsAndDefaults() is high (> 15) (gocyclo)
    • ql/etc.go
    • Line 517: warning: cyclomatic complexity 300 of function convert() is high (> 15) (gocyclo)
    • Line 1740: warning: cyclomatic complexity 281 of function collate1() is high (> 15) (gocyclo)
    • Line 1355: warning: cyclomatic complexity 137 of function typeCheck() is high (> 15) (gocyclo)
    • Line 330: warning: cyclomatic complexity 46 of function sliceExpr() is high (> 15) (gocyclo)
    • Line 219: warning: cyclomatic complexity 46 of function indexExpr() is high (> 15) (gocyclo)
    • Line 162: warning: cyclomatic complexity 20 of function limOffExpr() is high (> 15) (gocyclo)
    • Line 105: warning: cyclomatic complexity 20 of function intExpr() is high (> 15) (gocyclo)
    • ql/stmt.go
    • Line 189: warning: cyclomatic complexity 35 of function (*updateStmt).exec() is high (> 15) (gocyclo)
    • Line 347: warning: cyclomatic complexity 31 of function (*deleteStmt).exec() is high (> 15) (gocyclo)
    • Line 796: warning: cyclomatic complexity 26 of function (*selectStmt).plan() is high (> 15) (gocyclo)
    • Line 1108: warning: cyclomatic complexity 24 of function (*createIndexStmt).exec() is high (> 15) (gocyclo)
    • Line 572: warning: cyclomatic complexity 19 of function (*alterTableDropColumnStmt).exec() is high (> 15) (gocyclo)
    • Line 1229: warning: cyclomatic complexity 18 of function (*createTableStmt).exec() is high (> 15) (gocyclo)
    • Line 665: warning: cyclomatic complexity 18 of function (*alterTableAddStmt).exec() is high (> 15) (gocyclo)
    • ql/driver.go
    • Line 489: warning: cyclomatic complexity 25 of function (*driverRows).Next() is high (> 15) (gocyclo)
    • Line 183: warning: cyclomatic complexity 24 of function (*sqlDriver).Open() is high (> 15) (gocyclo)
    • ql/httpfs.go
    • Line 213: warning: cyclomatic complexity 23 of function (*HTTPFS).Open() is high (> 15) (gocyclo)
    • ql/btree.go
    • Line 207: warning: cyclomatic complexity 17 of function (*tree).Delete() is high (> 15) (gocyclo)
    • ql/ql/main.go
    • Line 209: warning: cyclomatic complexity 30 of function run() is high (> 15) (gocyclo)
    • Line 116: warning: cyclomatic complexity 19 of function do() is high (> 15) (gocyclo)

ineffassign93%

IneffAssign detects ineffectual assignments in Go code.


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!