Preparing report...

Report for github.com/k1LoW/tbls

A    Great!    Found 39 issues across 71 files

Tweet

gofmt81%

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!


gocyclo87%

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.

    • tbls/drivers/sqlite/sqlite.go
    • Line 44: warning: cyclomatic complexity 48 of function (*Sqlite).Analyze() is high (> 15) (gocyclo)
    • Line 442: warning: cyclomatic complexity 16 of function parseCheckConstraints() is high (> 15) (gocyclo)
    • tbls/output/md/md.go
    • Line 466: warning: cyclomatic complexity 26 of function (*Md).makeTableTemplateData() is high (> 15) (gocyclo)
    • Line 292: warning: cyclomatic complexity 17 of function DiffSchemaAndDocs() is high (> 15) (gocyclo)
    • tbls/ddl/ddl.go
    • Line 10: warning: cyclomatic complexity 26 of function ParseReferencedTables() is high (> 15) (gocyclo)

golint67%

Golint is a linter for Go source code.

    • tbls/drivers/snowflake/snowflake.go
    • Line 8: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 11: warning: exported type Snowflake should have comment or be unexported (golint)
    • Line 15: warning: exported function New should have comment or be unexported (golint)
    • Line 21: warning: exported method Snowflake.Analyze should have comment or be unexported (golint)
    • Line 118: warning: exported method Snowflake.Info should have comment or be unexported (golint)
    • Line 118: warning: receiver name s should be consistent with previous receiver name sf for Snowflake (golint)
    • tbls/dict/dict.go
    • Line 10: warning: exported type Dict should have comment or be unexported (golint)
    • Line 19: warning: exported method Dict.Lookup should have comment or be unexported (golint)
    • Line 26: warning: exported method Dict.Store should have comment or be unexported (golint)
    • Line 30: warning: exported method Dict.Delete should have comment or be unexported (golint)
    • Line 34: warning: exported method Dict.Range should have comment or be unexported (golint)
    • Line 38: warning: exported method Dict.Merge should have comment or be unexported (golint)
    • Line 44: warning: exported method Dict.MergeIfNotPresent should have comment or be unexported (golint)
    • Line 50: warning: exported method Dict.Dump should have comment or be unexported (golint)
    • Line 59: warning: exported method Dict.MarshalJSON should have comment or be unexported (golint)
    • Line 63: warning: exported method Dict.UnmarshalJSON should have comment or be unexported (golint)
    • Line 75: warning: exported method Dict.MarchalYAML should have comment or be unexported (golint)
    • Line 79: warning: exported method Dict.UnmarshalYAML should have comment or be unexported (golint)
    • tbls/drivers/dynamo/dynamo.go
    • Line 16: warning: exported type Dynamodb should have comment or be unexported (golint)
    • Line 21: warning: exported function New should have comment or be unexported (golint)
    • Line 28: warning: exported method Dynamodb.Analyze should have comment or be unexported (golint)
    • Line 143: warning: exported method Dynamodb.Info should have comment or be unexported (golint)
    • tbls/drivers/spanner/spanner.go
    • Line 14: warning: exported type Spanner should have comment or be unexported (golint)
    • Line 33: warning: exported method Spanner.Analyze should have comment or be unexported (golint)
    • Line 342: warning: exported method Spanner.Info should have comment or be unexported (golint)
    • tbls/output/config/config.go
    • Line 13: warning: exported const NoTableComment should have comment or be unexported (golint)
    • Line 14: warning: exported const NoColumnComment should have comment or be unexported (golint)
    • Line 28: warning: exported method Config.OutputSchema should have comment or be unexported (golint)
    • Line 98: warning: exported method Config.OutputTable should have comment or be unexported (golint)
    • tbls/output/plantuml/plantuml.go
    • Line 38: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 54: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • tbls/coverage/coverage.go
    • Line 10: warning: exported type Coverage should have comment or be unexported (golint)
    • Line 18: warning: exported type TableCoverage should have comment or be unexported (golint)
    • tbls/drivers/mysql/mysql.go
    • Line 32: warning: exported function ShowAutoIcrrement should have comment or be unexported (golint)
    • Line 42: warning: exported function HideAutoIcrrement should have comment or be unexported (golint)
    • tbls/config/yaml.go
    • Line 7: warning: exported method DSN.MarshalYAML should have comment or be unexported (golint)
    • Line 15: warning: exported method DSN.UnmarshalYAML should have comment or be unexported (golint)
    • tbls/config/config.go
    • Line 23: warning: exported const DefaultDocPath should have comment or be unexported (golint)
    • Line 25: warning: exported var DefaultConfigFilePaths should have comment or be unexported (golint)
    • Line 58: warning: exported type DSN should have comment or be unexported (golint)
    • Line 98: warning: exported type DetectVirtualRelations should have comment or be unexported (golint)
    • Line 213: warning: comment on exported method Config.LoadOption should be of the form "LoadOption ..." (golint)
    • tbls/output/md/md.go
    • Line 47: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 63: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • tbls/schema/schema.go
    • Line 14: warning: exported const TypeFK should have comment (or a comment on this block) or be unexported (golint)
    • Line 17: warning: exported type Label should have comment or be unexported (golint)
    • Line 22: warning: exported type Labels should have comment or be unexported (golint)
    • Line 24: warning: exported method Labels.Merge should have comment or be unexported (golint)
    • Line 98: warning: exported type DriverMeta should have comment or be unexported (golint)
    • Line 121: warning: exported method Schema.NormalizeTableName should have comment or be unexported (golint)
    • Line 128: warning: exported method Schema.NormalizeTableNames should have comment or be unexported (golint)
    • Line 232: warning: exported method Table.HasColumnWithExtraDef should have comment or be unexported (golint)
    • Line 331: warning: exported method Table.CollectTablesAndRelations should have comment or be unexported (golint)
    • tbls/drivers/bq/bq.go
    • Line 32: warning: exported method Bigquery.Analyze should have comment or be unexported (golint)
    • Line 128: warning: exported method Bigquery.Info 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.


misspell0%

Misspell Finds commonly misspelled English words

An error occurred while running this test (exit status 2)