Preparing report...

Report for github.com/schemahero/schemahero

A+    Excellent!    Found 89 issues across 186 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!


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.


golint55%

Golint is a linter for Go source code.

    • schemahero/pkg/apis/schemas/v1alpha4/mysql.go
    • Line 19: warning: exported type MysqlTableColumnConstraints should have comment or be unexported (golint)
    • Line 23: warning: exported type MysqlTableColumnAttributes should have comment or be unexported (golint)
    • Line 27: warning: exported type MysqlTableForeignKeyReferences should have comment or be unexported (golint)
    • Line 32: warning: exported type MysqlTableForeignKey should have comment or be unexported (golint)
    • Line 39: warning: exported type MysqlTableIndex should have comment or be unexported (golint)
    • Line 46: warning: exported type MysqlTableColumn should have comment or be unexported (golint)
    • Line 56: warning: exported type MysqlTableSchema should have comment or be unexported (golint)
    • schemahero/pkg/apis/schemas/v1alpha4/postgresql.go
    • Line 19: warning: exported type PostgresqlTableTrigger should have comment or be unexported (golint)
    • Line 30: warning: exported type PostgresqlTableForeignKeyReferences should have comment or be unexported (golint)
    • Line 35: warning: exported type PostgresqlTableForeignKey should have comment or be unexported (golint)
    • Line 42: warning: exported type PostgresqlTableIndex should have comment or be unexported (golint)
    • Line 49: warning: exported type PostgresqlTableColumnConstraints should have comment or be unexported (golint)
    • Line 53: warning: exported type PostgresqlTableColumnAttributes should have comment or be unexported (golint)
    • Line 57: warning: exported type PostgresqlTableColumn should have comment or be unexported (golint)
    • Line 65: warning: exported type PostgresqlTableSchema should have comment or be unexported (golint)
    • schemahero/pkg/apis/schemas/v1alpha4/sqlite.go
    • Line 19: warning: exported type SqliteTableColumnConstraints should have comment or be unexported (golint)
    • Line 23: warning: exported type SqliteTableColumnAttributes should have comment or be unexported (golint)
    • Line 27: warning: exported type SqliteTableForeignKeyReferences should have comment or be unexported (golint)
    • Line 32: warning: exported type SqliteTableForeignKey should have comment or be unexported (golint)
    • Line 39: warning: exported type SqliteTableIndex should have comment or be unexported (golint)
    • Line 46: warning: exported type SqliteTableColumn should have comment or be unexported (golint)
    • Line 54: warning: exported type SqliteTableSchema should have comment or be unexported (golint)
    • schemahero/pkg/database/cassandra/deploy.go
    • Line 14: warning: exported function PlanCassandraType should have comment or be unexported (golint)
    • Line 50: warning: exported function PlanCassandraTable should have comment or be unexported (golint)
    • Line 274: warning: exported function DeployCassandraStatements should have comment or be unexported (golint)
    • schemahero/pkg/database/types/foreignkey.go
    • Line 10: warning: exported type ForeignKey should have comment or be unexported (golint)
    • Line 18: warning: exported method ForeignKey.Equals should have comment or be unexported (golint)
    • Line 24: warning: exported function ForeignKeyToMysqlSchemaForeignKey should have comment or be unexported (golint)
    • Line 38: warning: exported function ForeignKeyToPostgresqlSchemaForeignKey should have comment or be unexported (golint)
    • Line 52: warning: exported function MysqlSchemaForeignKeyToForeignKey should have comment or be unexported (golint)
    • Line 64: warning: exported function PostgresqlSchemaForeignKeyToForeignKey should have comment or be unexported (golint)
    • Line 76: warning: exported function GenerateMysqlFKName should have comment or be unexported (golint)
    • Line 84: warning: exported function GeneratePostgresqlFKName should have comment or be unexported (golint)
    • Line 92: warning: exported function GenerateSqliteFKName should have comment or be unexported (golint)
    • schemahero/pkg/database/database.go
    • Line 21: warning: exported type Database should have comment or be unexported (golint)
    • Line 32: warning: exported method Database.CreateFixturesSync should have comment or be unexported (golint)
    • Line 135: warning: exported method Database.PlanSyncFromFile should have comment or be unexported (golint)
    • Line 171: warning: exported method Database.PlanSyncTableSpec should have comment or be unexported (golint)
    • Line 212: warning: exported method Database.PlanSyncTypeSpec should have comment or be unexported (golint)
    • Line 224: warning: exported method Database.ApplySync should have comment or be unexported (golint)
    • schemahero/pkg/database/postgres/index.go
    • Line 12: warning: exported function RemoveConstraintStatement should have comment or be unexported (golint)
    • Line 16: warning: exported function RemoveIndexStatement should have comment or be unexported (golint)
    • Line 23: warning: exported function AddIndexStatement should have comment or be unexported (golint)
    • Line 41: warning: exported function RenameIndexStatement should have comment or be unexported (golint)
    • schemahero/pkg/database/types/keyconstraint.go
    • Line 8: warning: exported type KeyConstraint should have comment or be unexported (golint)
    • Line 14: warning: exported method KeyConstraint.Equals should have comment or be unexported (golint)
    • Line 35: warning: exported method KeyConstraint.GenerateName should have comment or be unexported (golint)
    • schemahero/pkg/apis/databases/v1alpha4/string_or_value.go
    • Line 3: warning: exported type ValueOrSecretRef should have comment or be unexported (golint)
    • Line 8: warning: exported type ValueFrom should have comment or be unexported (golint)
    • Line 14: warning: exported type ValueFromSecret should have comment or be unexported (golint)
    • Line 18: warning: exported type SecretKeyRef should have comment or be unexported (golint)
    • Line 23: warning: exported type Vault should have comment or be unexported (golint)
    • Line 34: warning: exported type SSM should have comment or be unexported (golint)
    • schemahero/pkg/apis/schemas/v1alpha4/cassandra.go
    • Line 19: warning: exported type CassandraColumn should have comment or be unexported (golint)
    • Line 25: warning: exported type CassandraClusteringOrder should have comment or be unexported (golint)
    • Line 30: warning: exported type CassandraTableProperties should have comment or be unexported (golint)
    • Line 47: warning: exported type CassandraTableSchema should have comment or be unexported (golint)
    • Line 56: warning: exported type CassandraField should have comment or be unexported (golint)
    • Line 61: warning: exported type CassandraDataTypeSchema should have comment or be unexported (golint)
    • schemahero/pkg/database/mysql/tables.go
    • Line 12: warning: exported method MysqlConnection.ListTables should have comment or be unexported (golint)
    • Line 58: warning: exported method MysqlConnection.ListTableIndexes should have comment or be unexported (golint)
    • Line 103: warning: exported method MysqlConnection.ListTableForeignKeys should have comment or be unexported (golint)
    • Line 153: warning: exported method MysqlConnection.GetTablePrimaryKey should have comment or be unexported (golint)
    • Line 193: warning: exported method MysqlConnection.GetTableSchema should have comment or be unexported (golint)
    • schemahero/pkg/logger/logger.go
    • Line 30: warning: exported function SetDebug should have comment or be unexported (golint)
    • Line 34: warning: exported function Error should have comment or be unexported (golint)
    • Line 40: warning: exported function Info should have comment or be unexported (golint)
    • Line 46: warning: exported function Infof should have comment or be unexported (golint)
    • Line 52: warning: exported function Debug should have comment or be unexported (golint)
    • Line 58: warning: exported function Debugf should have comment or be unexported (golint)
    • schemahero/pkg/database/mysql/index.go
    • Line 11: warning: exported function RemoveIndexStatement should have comment or be unexported (golint)
    • Line 15: warning: exported function AddIndexStatement should have comment or be unexported (golint)
    • Line 29: warning: exported function RenameIndexStatement should have comment or be unexported (golint)
    • schemahero/pkg/database/sqlite/connection.go
    • Line 6: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 9: warning: exported type SqliteConnection should have comment or be unexported (golint)
    • Line 13: warning: exported function Connect should have comment or be unexported (golint)
    • Line 26: warning: exported method SqliteConnection.Close should have comment or be unexported (golint)
    • schemahero/pkg/database/mysql/alter_statements.go
    • Line 10: warning: exported type AlterModifyColumnStatement should have comment or be unexported (golint)
    • Line 16: warning: exported method AlterModifyColumnStatement.DDL should have comment or be unexported (golint)
    • Line 107: warning: exported type AlterDropColumnStatement should have comment or be unexported (golint)
    • Line 112: warning: exported method AlterDropColumnStatement.DDL should have comment or be unexported (golint)
    • Line 118: warning: exported type AlterRemoveConstrantStatement should have comment or be unexported (golint)
    • Line 130: warning: exported type AlterAddConstrantStatement should have comment or be unexported (golint)
    • schemahero/pkg/database/types/column.go
    • Line 7: warning: exported type ColumnConstraints should have comment or be unexported (golint)
    • Line 11: warning: exported type ColumnAttributes should have comment or be unexported (golint)
    • Line 15: warning: exported function BoolsEqual should have comment or be unexported (golint)
    • Line 22: warning: exported type Column should have comment or be unexported (golint)
    • Line 34: warning: exported function ColumnToMysqlSchemaColumn should have comment or be unexported (golint)
    • Line 60: warning: exported function ColumnToPostgresqlSchemaColumn should have comment or be unexported (golint)
    • schemahero/pkg/database/postgres/connection.go
    • Line 15: warning: exported type PostgresConnection should have comment or be unexported (golint)
    • Line 22: warning: exported method PostgresConnection.DatabaseName should have comment or be unexported (golint)
    • Line 26: warning: exported method PostgresConnection.EngineVersion should have comment or be unexported (golint)
    • Line 30: warning: exported function Connect should have comment or be unexported (golint)
    • Line 65: warning: exported method PostgresConnection.Close should have comment or be unexported (golint)
    • Line 69: warning: exported function DatabaseNameFromURI should have comment or be unexported (golint)
    • schemahero/pkg/database/types/index.go
    • Line 10: warning: exported type Index should have comment or be unexported (golint)
    • Line 16: warning: exported method Index.Equals should have comment or be unexported (golint)
    • Line 44: warning: exported function IndexToMysqlSchemaIndex should have comment or be unexported (golint)
    • Line 54: warning: exported function IndexToPostgresqlSchemaIndex should have comment or be unexported (golint)
    • Line 64: warning: exported function MysqlSchemaIndexToIndex should have comment or be unexported (golint)
    • Line 74: warning: exported function PostgresqlSchemaIndexToIndex should have comment or be unexported (golint)
    • Line 84: warning: exported function GenerateMysqlIndexName should have comment or be unexported (golint)
    • Line 88: warning: exported function GeneratePostgresqlIndexName should have comment or be unexported (golint)
    • schemahero/pkg/database/cassandra/connection.go
    • Line 8: warning: exported type CassandraConnection should have comment or be unexported (golint)
    • Line 13: warning: exported function Connect should have comment or be unexported (golint)
    • Line 36: warning: exported method CassandraConnection.Close should have comment or be unexported (golint)
    • schemahero/pkg/database/postgres/tables.go
    • Line 17: warning: exported method PostgresConnection.ListTables should have comment or be unexported (golint)
    • Line 40: warning: exported method PostgresConnection.ListTableConstraints should have comment or be unexported (golint)
    • Line 61: warning: exported method PostgresConnection.ListTableIndexes should have comment or be unexported (golint)
    • Line 99: warning: exported method PostgresConnection.ListTableForeignKeys should have comment or be unexported (golint)
    • Line 171: warning: exported method PostgresConnection.GetTablePrimaryKey should have comment or be unexported (golint)
    • Line 210: warning: exported method PostgresConnection.GetTableSchema should have comment or be unexported (golint)
    • schemahero/pkg/database/sqlite/alter_statements.go
    • Line 10: warning: exported type AlterModifyColumnStatement should have comment or be unexported (golint)
    • Line 16: warning: exported method AlterModifyColumnStatement.DDL should have comment or be unexported (golint)
    • Line 77: warning: exported type AlterDropColumnStatement should have comment or be unexported (golint)
    • Line 82: warning: exported method AlterDropColumnStatement.DDL should have comment or be unexported (golint)
    • Line 88: warning: exported type AlterRemoveConstrantStatement should have comment or be unexported (golint)
    • Line 100: warning: exported type AlterAddConstrantStatement should have comment or be unexported (golint)
    • schemahero/pkg/database/mysql/connection.go
    • Line 12: warning: exported type MysqlConnection should have comment or be unexported (golint)
    • Line 18: warning: exported method MysqlConnection.GetDB should have comment or be unexported (golint)
    • Line 22: warning: exported method MysqlConnection.DatabaseName should have comment or be unexported (golint)
    • Line 26: warning: exported method MysqlConnection.EngineVersion should have comment or be unexported (golint)
    • Line 30: warning: exported function Connect should have comment or be unexported (golint)
    • Line 56: warning: exported method MysqlConnection.Close should have comment or be unexported (golint)
    • Line 59: warning: exported function DatabaseNameFromURI should have comment or be unexported (golint)
    • Line 68: warning: exported function UsernameFromURI should have comment or be unexported (golint)
    • Line 77: warning: exported function PasswordFromURI should have comment or be unexported (golint)
    • Line 86: warning: exported function HostnameFromURI 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.

    • schemahero/pkg/database/mysql/parameterized.go
    • Line 85: warning: ineffectual assignment to columnType (ineffassign)
    • Line 101: warning: ineffectual assignment to columnType (ineffassign)
    • Line 117: warning: ineffectual assignment to columnType (ineffassign)
    • Line 133: warning: ineffectual assignment to columnType (ineffassign)
    • Line 149: warning: ineffectual assignment to columnType (ineffassign)
    • Line 165: warning: ineffectual assignment to columnType (ineffassign)
    • Line 204: warning: ineffectual assignment to columnType (ineffassign)
    • Line 215: warning: ineffectual assignment to columnType (ineffassign)
    • Line 231: warning: ineffectual assignment to columnType (ineffassign)
    • schemahero/pkg/database/sqlite/parameterized.go
    • Line 38: warning: ineffectual assignment to columnType (ineffassign)
    • Line 54: warning: ineffectual assignment to columnType (ineffassign)
    • Line 75: warning: ineffectual assignment to columnType (ineffassign)
    • Line 91: warning: ineffectual assignment to columnType (ineffassign)
    • Line 107: warning: ineffectual assignment to columnType (ineffassign)
    • Line 123: warning: ineffectual assignment to columnType (ineffassign)
    • Line 139: warning: ineffectual assignment to columnType (ineffassign)
    • Line 155: warning: ineffectual assignment to columnType (ineffassign)
    • Line 171: warning: ineffectual assignment to columnType (ineffassign)
    • Line 210: warning: ineffectual assignment to columnType (ineffassign)
    • Line 221: warning: ineffectual assignment to columnType (ineffassign)
    • Line 237: warning: ineffectual assignment to columnType (ineffassign)

misspell99%

Misspell Finds commonly misspelled English words