Preparing report...

Report for github.com/snowplow/sql-runner

A+    Excellent!    Found 17 issues across 26 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!


golint38%

Golint is a linter for Go source code.

    • sql-runner/sql_runner/consul_provider.go
    • Line 15: warning: exported type ConsulPlaybookProvider should have comment or be unexported (golint)
    • Line 21: warning: exported function NewConsulPlaybookProvider should have comment or be unexported (golint)
    • Line 29: warning: exported method ConsulPlaybookProvider.GetPlaybook should have comment or be unexported (golint)
    • sql-runner/sql_runner/consul_utils.go
    • Line 20: warning: exported function GetConsulClient should have comment or be unexported (golint)
    • Line 43: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 55: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • sql-runner/sql_runner/snowflake_target.go
    • Line 34: warning: exported type SnowFlakeTarget should have comment or be unexported (golint)
    • Line 39: warning: exported method SnowFlakeTarget.IsConnectable should have comment or be unexported (golint)
    • Line 45: warning: exported function NewSnowflakeTarget should have comment or be unexported (golint)
    • Line 77: warning: exported method SnowFlakeTarget.GetTarget should have comment or be unexported (golint)
    • Line 81: warning: comment on exported method SnowFlakeTarget.RunQuery should be of the form "RunQuery ..." (golint)
    • sql-runner/sql_runner/playbook.go
    • Line 15: warning: comment on exported type Playbook should be of the form "Playbook ..." (with optional leading article) (golint)
    • Line 22: warning: exported type Target should have comment or be unexported (golint)
    • Line 28: warning: exported type Step should have comment or be unexported (golint)
    • Line 33: warning: exported type Query should have comment or be unexported (golint)
    • Line 38: warning: comment on exported function NewPlaybook should be of the form "NewPlaybook ..." (golint)
    • Line 43: warning: exported method Playbook.MergeCLIVariables should have comment or be unexported (golint)
    • sql-runner/sql_runner/run.go
    • Line 23: warning: exported const REDSHIFT_TYPE should have comment (or a comment on this block) or be unexported (golint)
    • Line 35: warning: comment on exported type TargetStatus should be of the form "TargetStatus ..." (with optional leading article) (golint)
    • Line 43: warning: comment on exported type StepStatus should be of the form "StepStatus ..." (with optional leading article) (golint)
    • Line 50: warning: comment on exported type QueryStatus should be of the form "QueryStatus ..." (with optional leading article) (golint)
    • Line 58: warning: comment on exported type ReadyStep should be of the form "ReadyStep ..." (with optional leading article) (golint)
    • Line 64: warning: comment on exported type ReadyQuery should be of the form "ReadyQuery ..." (with optional leading article) (golint)
    • Line 71: warning: comment on exported function Run should be of the form "Run ..." (golint)
    • Line 230: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • sql-runner/sql_runner/scanner.go
    • Line 19: warning: exported type Results should have comment or be unexported (golint)
    • Line 28: warning: exported method Results.Init should have comment or be unexported (golint)
    • Line 42: warning: exported method Results.NewModel should have comment or be unexported (golint)
    • Line 46: warning: exported method Results.AddModel should have comment or be unexported (golint)
    • Line 50: warning: exported method Results.ScanColumn should have comment or be unexported (golint)
    • sql-runner/sql_runner/lock_file.go
    • Line 23: warning: exported type LockFile should have comment or be unexported (golint)
    • Line 43: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 80: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 106: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 124: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • Line 132: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • sql-runner/sql_runner/options.go
    • Line 22: warning: exported type CLIVariables should have comment or be unexported (golint)
    • Line 29: warning: exported method CLIVariables.Set should have comment or be unexported (golint)
    • Line 44: warning: exported type Options should have comment or be unexported (golint)
    • Line 63: warning: exported function NewOptions should have comment or be unexported (golint)
    • Line 67: warning: exported method Options.GetFlagSet should have comment or be unexported (golint)
    • sql-runner/sql_runner/yaml_provider.go
    • Line 15: warning: exported type YAMLFilePlaybookProvider should have comment or be unexported (golint)
    • Line 20: warning: exported function NewYAMLFilePlaybookProvider should have comment or be unexported (golint)
    • Line 27: warning: exported method YAMLFilePlaybookProvider.GetPlaybook should have comment or be unexported (golint)
    • sql-runner/sql_runner/bigquery_target.go
    • Line 26: warning: exported type BigQueryTarget should have comment or be unexported (golint)
    • Line 31: warning: exported method BigQueryTarget.IsConnectable should have comment or be unexported (golint)
    • Line 54: warning: exported function NewBigQueryTarget should have comment or be unexported (golint)
    • Line 68: warning: exported method BigQueryTarget.GetTarget should have comment or be unexported (golint)
    • Line 72: warning: comment on exported method BigQueryTarget.RunQuery should be of the form "RunQuery ..." (golint)
    • sql-runner/sql_runner/postgres_target.go
    • Line 33: warning: exported type PostgresTarget should have comment or be unexported (golint)
    • Line 38: warning: exported method PostgresTarget.IsConnectable should have comment or be unexported (golint)
    • Line 45: warning: exported function NewPostgresTarget should have comment or be unexported (golint)
    • Line 73: warning: exported method PostgresTarget.GetTarget should have comment or be unexported (golint)
    • Line 77: warning: comment on exported method PostgresTarget.RunQuery should be of the form "RunQuery ..." (golint)
    • sql-runner/sql_runner/sql_provider.go
    • Line 20: warning: exported type SQLProvider should have comment or be unexported (golint)
    • Line 25: warning: exported type FileSQLProvider should have comment or be unexported (golint)
    • Line 29: warning: exported function NewFileSQLProvider should have comment or be unexported (golint)
    • Line 35: warning: exported method FileSQLProvider.GetSQL should have comment or be unexported (golint)
    • Line 39: warning: exported method FileSQLProvider.ResolveKey should have comment or be unexported (golint)
    • Line 52: warning: exported type ConsulSQLProvider should have comment or be unexported (golint)
    • Line 57: warning: exported function NewConsulSQLProvider should have comment or be unexported (golint)
    • Line 64: warning: exported method ConsulSQLProvider.GetSQL should have comment or be unexported (golint)
    • Line 68: warning: exported method ConsulSQLProvider.ResolveKey should have comment or be unexported (golint)

gocyclo100%

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.

No problems detected. Good job!


ineffassign88%

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!