Preparing report...

Report for github.com/knq/usql

A+    Excellent!    Found 26 issues across 117 files

Tweet

gofmt99%

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!


gocyclo88%

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.

    • usql/main.go
    • Line 73: warning: cyclomatic complexity 25 of function run() is high (> 15) (gocyclo)
    • usql/stmt/parse.go
    • Line 225: warning: cyclomatic complexity 28 of function findPrefix() is high (> 15) (gocyclo)
    • Line 185: warning: cyclomatic complexity 21 of function readCommand() is high (> 15) (gocyclo)
    • Line 88: warning: cyclomatic complexity 16 of function readString() is high (> 15) (gocyclo)

golint88%

Golint is a linter for Go source code.

    • usql/drivers/drivers.go
    • Line 471: warning: exported function NewCompleter should have comment or be unexported (golint)
    • Line 512: warning: exported function CopyWithInsert should have comment or be unexported (golint)
    • usql/drivers/metadata/informationschema/metadata.go
    • Line 32: warning: exported type Logger should have comment or be unexported (golint)
    • Line 36: warning: exported type ClauseName should have comment or be unexported (golint)
    • Line 39: warning: exported const ColumnsColumnSize should have comment (or a comment on this block) or be unexported (golint)
    • Line 160: warning: exported method InformationSchema.SetLimit should have comment or be unexported (golint)
    • Line 565: warning: comment on exported method InformationSchema.Constraints should be of the form "Constraints ..." (golint)
    • usql/drivers/metadata/reader.go
    • Line 67: warning: exported method PluginReader.Catalogs should have comment or be unexported (golint)
    • Line 74: warning: exported method PluginReader.Schemas should have comment or be unexported (golint)
    • Line 81: warning: exported method PluginReader.Tables should have comment or be unexported (golint)
    • Line 88: warning: exported method PluginReader.Columns should have comment or be unexported (golint)
    • Line 95: warning: exported method PluginReader.Indexes should have comment or be unexported (golint)
    • Line 102: warning: exported method PluginReader.IndexColumns should have comment or be unexported (golint)
    • Line 109: warning: exported method PluginReader.Constraints should have comment or be unexported (golint)
    • Line 116: warning: exported method PluginReader.ConstraintColumns should have comment or be unexported (golint)
    • Line 123: warning: exported method PluginReader.Functions should have comment or be unexported (golint)
    • Line 130: warning: exported method PluginReader.FunctionColumns should have comment or be unexported (golint)
    • Line 137: warning: exported method PluginReader.Sequences should have comment or be unexported (golint)
    • Line 144: warning: exported type LoggingReader should have comment or be unexported (golint)
    • Line 155: warning: exported function NewLoggingReader should have comment or be unexported (golint)
    • Line 220: warning: exported method LoggingReader.Query should have comment or be unexported (golint)
    • usql/env/types.go
    • Line 191: warning: exported function ParseBool should have comment or be unexported (golint)
    • Line 201: warning: exported function ParseKeywordBool should have comment or be unexported (golint)
    • Line 217: warning: exported function Get should have comment or be unexported (golint)
    • Line 221: warning: exported function Pget should have comment or be unexported (golint)
    • usql/args.go
    • Line 33: warning: exported method Args.Next should have comment or be unexported (golint)
    • Line 87: warning: exported function NewArgs should have comment or be unexported (golint)
    • usql/drivers/sqlite3/sqshared/reader.go
    • Line 12: warning: exported type MetadataReader should have comment or be unexported (golint)
    • Line 32: warning: exported method MetadataReader.SetLimit should have comment or be unexported (golint)
    • Line 84: warning: exported method MetadataReader.Tables should have comment or be unexported (golint)
    • Line 158: warning: exported method MetadataReader.Schemas should have comment or be unexported (golint)
    • Line 190: warning: exported method MetadataReader.Functions should have comment or be unexported (golint)
    • Line 237: warning: exported method MetadataReader.FunctionColumns should have comment or be unexported (golint)
    • Line 241: warning: exported method MetadataReader.Indexes should have comment or be unexported (golint)
    • Line 280: warning: exported method MetadataReader.IndexColumns should have comment or be unexported (golint)
    • usql/drivers/metadata/metadata.go
    • Line 8: warning: exported var ErrNotSupported should have comment or be unexported (golint)
    • Line 142: warning: exported type CatalogSet should have comment or be unexported (golint)
    • Line 146: warning: exported function NewCatalogSet should have comment or be unexported (golint)
    • Line 159: warning: exported method CatalogSet.Get should have comment or be unexported (golint)
    • Line 163: warning: exported type Catalog should have comment or be unexported (golint)
    • Line 171: warning: exported type SchemaSet should have comment or be unexported (golint)
    • Line 175: warning: exported function NewSchemaSet should have comment or be unexported (golint)
    • Line 188: warning: exported method SchemaSet.Get should have comment or be unexported (golint)
    • Line 192: warning: exported type Schema should have comment or be unexported (golint)
    • Line 201: warning: exported type TableSet should have comment or be unexported (golint)
    • Line 205: warning: exported function NewTableSet should have comment or be unexported (golint)
    • Line 227: warning: exported method TableSet.Get should have comment or be unexported (golint)
    • Line 231: warning: exported type Table should have comment or be unexported (golint)
    • Line 251: warning: exported type ColumnSet should have comment or be unexported (golint)
    • Line 255: warning: exported function NewColumnSet should have comment or be unexported (golint)
    • Line 282: warning: exported method ColumnSet.Get should have comment or be unexported (golint)
    • Line 286: warning: exported type Column should have comment or be unexported (golint)
    • Line 302: warning: exported type Bool should have comment or be unexported (golint)
    • Line 305: warning: exported var UNKNOWN should have comment or be unexported (golint)
    • Line 326: warning: exported type IndexSet should have comment or be unexported (golint)
    • Line 330: warning: exported function NewIndexSet should have comment or be unexported (golint)
    • Line 353: warning: exported method IndexSet.Get should have comment or be unexported (golint)
    • Line 357: warning: exported type Index should have comment or be unexported (golint)
    • Line 380: warning: exported type IndexColumnSet should have comment or be unexported (golint)
    • Line 384: warning: exported function NewIndexColumnSet should have comment or be unexported (golint)
    • Line 405: warning: exported method IndexColumnSet.Get should have comment or be unexported (golint)
    • Line 409: warning: exported type IndexColumn should have comment or be unexported (golint)
    • Line 430: warning: exported type ConstraintSet should have comment or be unexported (golint)
    • Line 434: warning: exported function NewConstraintSet should have comment or be unexported (golint)
    • Line 466: warning: exported method ConstraintSet.Get should have comment or be unexported (golint)
    • Line 470: warning: exported type Constraint should have comment or be unexported (golint)
    • Line 510: warning: exported type ConstraintColumnSet should have comment or be unexported (golint)
    • Line 514: warning: exported function NewConstraintColumnSet should have comment or be unexported (golint)
    • Line 538: warning: exported method ConstraintColumnSet.Get should have comment or be unexported (golint)
    • Line 542: warning: exported type ConstraintColumn should have comment or be unexported (golint)
    • Line 572: warning: exported type FunctionSet should have comment or be unexported (golint)
    • Line 576: warning: exported function NewFunctionSet should have comment or be unexported (golint)
    • Line 602: warning: exported method FunctionSet.Get should have comment or be unexported (golint)
    • Line 606: warning: exported type Function should have comment or be unexported (golint)
    • Line 636: warning: exported type FunctionColumnSet should have comment or be unexported (golint)
    • Line 640: warning: exported function NewFunctionColumnSet should have comment or be unexported (golint)
    • Line 666: warning: exported method FunctionColumnSet.Get should have comment or be unexported (golint)
    • Line 670: warning: exported type FunctionColumn should have comment or be unexported (golint)
    • Line 701: warning: exported type SequenceSet should have comment or be unexported (golint)
    • Line 705: warning: exported function NewSequenceSet should have comment or be unexported (golint)
    • Line 725: warning: exported method SequenceSet.Get should have comment or be unexported (golint)
    • Line 729: warning: exported type Sequence should have comment or be unexported (golint)
    • Line 760: warning: exported type Result should have comment or be unexported (golint)
    • usql/drivers/completer/completer.go
    • Line 1: warning: package comment should be of the form "Package completer ..." (golint)
    • Line 19: warning: exported const WORD_BREAKS should have comment (or a comment on this block) or be unexported (golint)
    • Line 25: warning: exported var IGNORE_CASE should have comment or be unexported (golint)
    • Line 29: warning: exported function NewDefaultCompleter should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell98%

Misspell Finds commonly misspelled English words