Preparing report...

Report for github.com/rubenv/sql-migrate

A    Great!    Found 15 issues across 24 files

Tweet

gofmt83%

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!


gocyclo91%

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.

    • sql-migrate/migrate.go
    • Line 442: warning: cyclomatic complexity 17 of function (MigrationSet).ExecMax() is high (> 15) (gocyclo)
    • Line 521: warning: cyclomatic complexity 16 of function (MigrationSet).PlanMigration() is high (> 15) (gocyclo)

golint50%

Golint is a linter for Go source code.

    • sql-migrate/sql-migrate/command_skip.go
    • Line 11: warning: exported type SkipCommand should have comment or be unexported (golint)
    • Line 14: warning: exported method SkipCommand.Help should have comment or be unexported (golint)
    • Line 30: warning: exported method SkipCommand.Synopsis should have comment or be unexported (golint)
    • Line 34: warning: exported method SkipCommand.Run should have comment or be unexported (golint)
    • Line 56: warning: exported function SkipMigrations should have comment or be unexported (golint)
    • sql-migrate/bindata_test.go
    • Line 11: warning: don't use underscores in Go names; func bindata_read should be bindataRead (golint)
    • Line 30: warning: don't use underscores in Go names; func test_migrations_1_initial_sql should be testMigrations1InitialSQL (golint)
    • Line 51: warning: don't use underscores in Go names; func test_migrations_2_record_sql should be testMigrations2RecordSQL (golint)
    • Line 127: warning: don't use underscores in Go names; type _bintree_t should be _bintreeT (golint)
    • sql-migrate/migrate.go
    • Line 23: warning: exported type MigrationDirection should have comment or be unexported (golint)
    • Line 26: warning: exported const Up should have comment (or a comment on this block) or be unexported (golint)
    • Line 94: warning: comment on exported function SetTable should be of the form "SetTable ..." (golint)
    • Line 118: warning: exported type Migration should have comment or be unexported (golint)
    • Line 127: warning: exported method Migration.Less should have comment or be unexported (golint)
    • Line 144: warning: exported method Migration.NumberPrefixMatches should have comment or be unexported (golint)
    • Line 148: warning: exported method Migration.VersionInt should have comment or be unexported (golint)
    • Line 157: warning: exported type PlannedMigration should have comment or be unexported (golint)
    • Line 170: warning: exported type MigrationRecord should have comment or be unexported (golint)
    • Line 175: warning: exported type OracleDialect should have comment or be unexported (golint)
    • Line 179: warning: exported method OracleDialect.IfTableNotExists should have comment or be unexported (golint)
    • Line 183: warning: exported method OracleDialect.IfSchemaNotExists should have comment or be unexported (golint)
    • Line 187: warning: exported method OracleDialect.IfTableExists should have comment or be unexported (golint)
    • Line 191: warning: exported var MigrationDialects should have comment or be unexported (golint)
    • Line 200: warning: exported type MigrationSource should have comment or be unexported (golint)
    • Line 207: warning: comment on exported type MemoryMigrationSource should be of the form "MemoryMigrationSource ..." (with optional leading article) (golint)
    • Line 214: warning: exported method MemoryMigrationSource.FindMigrations should have comment or be unexported (golint)
    • Line 226: warning: exported type HttpFileSystemMigrationSource should have comment or be unexported (golint)
    • Line 232: warning: exported method HttpFileSystemMigrationSource.FindMigrations should have comment or be unexported (golint)
    • Line 236: warning: comment on exported type FileMigrationSource should be of the form "FileMigrationSource ..." (with optional leading article) (golint)
    • Line 243: warning: exported method FileMigrationSource.FindMigrations should have comment or be unexported (golint)
    • Line 293: warning: comment on exported type AssetMigrationSource should be of the form "AssetMigrationSource ..." (with optional leading article) (golint)
    • Line 307: warning: exported method AssetMigrationSource.FindMigrations should have comment or be unexported (golint)
    • Line 337: warning: comment on exported type PackrBox should be of the form "PackrBox ..." (with optional leading article) (golint)
    • Line 344: warning: comment on exported type PackrMigrationSource should be of the form "PackrMigrationSource ..." (with optional leading article) (golint)
    • Line 354: warning: exported method PackrMigrationSource.FindMigrations should have comment or be unexported (golint)
    • Line 394: warning: comment on exported function ParseMigration should be of the form "ParseMigration ..." (golint)
    • Line 414: warning: exported type SqlExecutor should have comment or be unexported (golint)
    • Line 420: warning: comment on exported function Exec should be of the form "Exec ..." (golint)
    • Line 427: warning: comment on exported method MigrationSet.Exec should be of the form "Exec ..." (golint)
    • Line 432: warning: comment on exported function ExecMax should be of the form "ExecMax ..." (golint)
    • Line 441: warning: comment on exported method MigrationSet.ExecMax should be of the form "ExecMax ..." (golint)
    • Line 516: warning: comment on exported function PlanMigration should be of the form "PlanMigration ..." (golint)
    • Line 521: warning: exported method MigrationSet.PlanMigration should have comment or be unexported (golint)
    • Line 601: warning: comment on exported function SkipMax should be of the form "SkipMax ..." (golint)
    • Line 650: warning: comment on exported function ToApply should be of the form "ToApply ..." (golint)
    • Line 680: warning: exported function ToCatchup should have comment or be unexported (golint)
    • Line 701: warning: exported function GetMigrationRecords should have comment or be unexported (golint)
    • Line 705: warning: exported method MigrationSet.GetMigrationRecords should have comment or be unexported (golint)
    • Line 741: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • sql-migrate/sqlparse/sqlparse.go
    • Line 18: warning: exported type ParsedMigration should have comment or be unexported (golint)
    • Line 41: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 106: warning: comment on exported function ParseMigration should be of the form "ParseMigration ..." (golint)
    • sql-migrate/sql-migrate/command_down.go
    • Line 10: warning: exported type DownCommand should have comment or be unexported (golint)
    • Line 13: warning: exported method DownCommand.Help should have comment or be unexported (golint)
    • Line 30: warning: exported method DownCommand.Synopsis should have comment or be unexported (golint)
    • Line 34: warning: exported method DownCommand.Run should have comment or be unexported (golint)
    • sql-migrate/sql-migrate/command_redo.go
    • Line 11: warning: exported type RedoCommand should have comment or be unexported (golint)
    • Line 14: warning: exported method RedoCommand.Help should have comment or be unexported (golint)
    • Line 30: warning: exported method RedoCommand.Synopsis should have comment or be unexported (golint)
    • Line 34: warning: exported method RedoCommand.Run should have comment or be unexported (golint)
    • sql-migrate/sql-migrate/command_new.go
    • Line 25: warning: exported type NewCommand should have comment or be unexported (golint)
    • Line 28: warning: exported method NewCommand.Help should have comment or be unexported (golint)
    • Line 43: warning: exported method NewCommand.Synopsis should have comment or be unexported (golint)
    • Line 47: warning: exported method NewCommand.Run should have comment or be unexported (golint)
    • Line 69: warning: exported function CreateMigration should have comment or be unexported (golint)
    • sql-migrate/sql-migrate/command_status.go
    • Line 14: warning: exported type StatusCommand should have comment or be unexported (golint)
    • Line 17: warning: exported method StatusCommand.Help should have comment or be unexported (golint)
    • Line 32: warning: exported method StatusCommand.Synopsis should have comment or be unexported (golint)
    • Line 36: warning: exported method StatusCommand.Run should have comment or be unexported (golint)
    • sql-migrate/sql-migrate/command_up.go
    • Line 10: warning: exported type UpCommand should have comment or be unexported (golint)
    • Line 13: warning: exported method UpCommand.Help should have comment or be unexported (golint)
    • Line 30: warning: exported method UpCommand.Synopsis should have comment or be unexported (golint)
    • Line 34: warning: exported method UpCommand.Run should have comment or be unexported (golint)
    • sql-migrate/sql-migrate/config.go
    • Line 26: warning: exported var ConfigFile should have comment or be unexported (golint)
    • Line 27: warning: exported var ConfigEnvironment should have comment or be unexported (golint)
    • Line 29: warning: exported function ConfigFlags should have comment or be unexported (golint)
    • Line 34: warning: exported type Environment should have comment or be unexported (golint)
    • Line 42: warning: exported function ReadConfig should have comment or be unexported (golint)
    • Line 57: warning: exported function GetEnvironment should have comment or be unexported (golint)
    • Line 92: warning: exported function GetConnection 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!


misspell95%

Misspell Finds commonly misspelled English words