Preparing report...

Report for github.com/asterikx/sqlc

(v1.10.0)

A    Great!    Found 392 issues across 416 files

Tweet

gofmt97%

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!


golint11%

Golint is a linter for Go source code.

    • sqlc/internal/config/v_one.go
    • Line 11: warning: exported type V1GenerateSettings should have comment or be unexported (golint)
    • Line 84: warning: exported method V1GenerateSettings.ValidateGlobalOverrides should have comment or be unexported (golint)
    • Line 101: warning: exported method V1GenerateSettings.Translate should have comment or be unexported (golint)
    • sqlc/internal/sql/ast/a_array_expr.go
    • Line 3: warning: don't use underscores in Go names; type A_ArrayExpr should be AArrayExpr (golint)
    • Line 3: warning: exported type A_ArrayExpr should have comment or be unexported (golint)
    • Line 8: warning: exported method A_ArrayExpr.Pos should have comment or be unexported (golint)
    • sqlc/internal/engine/sqlite/convert.go
    • Line 14: warning: don't use underscores in Go names; func convertAlter_table_stmtContext should be convertAlterTableStmtContext (golint)
    • Line 56: warning: don't use underscores in Go names; func convertAttach_stmtContext should be convertAttachStmtContext (golint)
    • Line 63: warning: don't use underscores in Go names; func convertCreate_table_stmtContext should be convertCreateTableStmtContext (golint)
    • Line 80: warning: don't use underscores in Go names; func convertDrop_table_stmtContext should be convertDropTableStmtContext (golint)
    • Line 91: warning: don't use underscores in Go names; func convertFactored_select_stmtContext should be convertFactoredSelectStmtContext (golint)
    • Line 150: warning: don't use underscores in Go names; func convertSql_stmtContext should be convertSQLStmtContext (golint)
    • sqlc/internal/codegen/golang/enum.go
    • Line 8: warning: exported var IdentPattern should have comment or be unexported (golint)
    • Line 10: warning: exported type Constant should have comment or be unexported (golint)
    • Line 16: warning: exported type Enum should have comment or be unexported (golint)
    • Line 22: warning: exported function EnumReplace should have comment or be unexported (golint)
    • Line 29: warning: exported function EnumValueName should have comment or be unexported (golint)
    • sqlc/internal/migrations/migrations.go
    • Line 8: warning: comment on exported function RemoveRollbackStatements should be of the form "RemoveRollbackStatements ..." (golint)
    • Line 35: warning: exported function IsDown should have comment or be unexported (golint)
    • sqlc/internal/sql/catalog/public.go
    • Line 18: warning: exported method Catalog.ListFuncsByName should have comment or be unexported (golint)
    • Line 35: warning: exported method Catalog.ResolveFuncCall should have comment or be unexported (golint)
    • Line 126: warning: exported method Catalog.GetTable should have comment or be unexported (golint)
    • Line 130: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • sqlc/internal/sql/ast/set_operation.go
    • Line 6: warning: exported const None should have comment (or a comment on this block) or be unexported (golint)
    • Line 12: warning: exported type SetOperation should have comment or be unexported (golint)
    • Line 14: warning: exported method SetOperation.Pos should have comment or be unexported (golint)
    • sqlc/internal/source/code.go
    • Line 11: warning: exported type Edit should have comment or be unexported (golint)
    • Line 17: warning: exported function LineNumber should have comment or be unexported (golint)
    • Line 47: warning: exported function Pluck should have comment or be unexported (golint)
    • Line 53: warning: exported function Mutate should have comment or be unexported (golint)
    • Line 80: warning: exported function StripComments should have comment or be unexported (golint)
    • sqlc/internal/sql/ast/a_indirection.go
    • Line 3: warning: don't use underscores in Go names; type A_Indirection should be AIndirection (golint)
    • Line 3: warning: exported type A_Indirection should have comment or be unexported (golint)
    • Line 8: warning: exported method A_Indirection.Pos should have comment or be unexported (golint)
    • sqlc/internal/sql/ast/a_indices.go
    • Line 3: warning: don't use underscores in Go names; type A_Indices should be AIndices (golint)
    • Line 3: warning: exported type A_Indices should have comment or be unexported (golint)
    • Line 9: warning: exported method A_Indices.Pos should have comment or be unexported (golint)
    • sqlc/internal/opts/debug.go
    • Line 14: warning: exported type Debug should have comment or be unexported (golint)
    • Line 19: warning: exported function DebugFromEnv should have comment or be unexported (golint)
    • sqlc/internal/compiler/compat.go
    • Line 27: warning: exported type Relation should have comment or be unexported (golint)
    • Line 79: warning: exported function ParseTableName should have comment or be unexported (golint)
    • Line 91: warning: exported function ParseTypeName should have comment or be unexported (golint)
    • Line 103: warning: exported function ParseRelationString should have comment or be unexported (golint)
    • sqlc/internal/compiler/engine.go
    • Line 14: warning: exported type Compiler should have comment or be unexported (golint)
    • Line 22: warning: exported function NewCompiler should have comment or be unexported (golint)
    • Line 40: warning: exported method Compiler.Catalog should have comment or be unexported (golint)
    • Line 44: warning: exported method Compiler.ParseCatalog should have comment or be unexported (golint)
    • Line 48: warning: exported method Compiler.ParseQueries should have comment or be unexported (golint)
    • Line 57: warning: exported method Compiler.Result should have comment or be unexported (golint)
    • sqlc/internal/sql/ast/a_const.go
    • Line 3: warning: don't use underscores in Go names; type A_Const should be AConst (golint)
    • Line 3: warning: exported type A_Const should have comment or be unexported (golint)
    • Line 8: warning: exported method A_Const.Pos should have comment or be unexported (golint)
    • sqlc/internal/sql/lang/operator.go
    • Line 5: warning: exported function IsComparisonOperator should have comment or be unexported (golint)
    • Line 20: warning: exported function IsMathematicalOperator should have comment or be unexported (golint)
    • sqlc/internal/sql/sqlerr/errors.go
    • Line 8: warning: error var Exists should have name of the form ErrFoo (golint)
    • Line 8: warning: exported var Exists should have comment or be unexported (golint)
    • Line 9: warning: error var NotFound should have name of the form ErrFoo (golint)
    • Line 9: warning: exported var NotFound should have comment or be unexported (golint)
    • Line 10: warning: error var NotUnique should have name of the form ErrFoo (golint)
    • Line 10: warning: exported var NotUnique should have comment or be unexported (golint)
    • Line 12: warning: exported type Error should have comment or be unexported (golint)
    • Line 29: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 34: warning: exported function ColumnExists should have comment or be unexported (golint)
    • Line 42: warning: exported function ColumnNotFound should have comment or be unexported (golint)
    • Line 50: warning: exported function RelationExists should have comment or be unexported (golint)
    • Line 58: warning: exported function RelationNotFound should have comment or be unexported (golint)
    • Line 66: warning: exported function SchemaExists should have comment or be unexported (golint)
    • Line 74: warning: exported function SchemaNotFound should have comment or be unexported (golint)
    • Line 82: warning: exported function TypeExists should have comment or be unexported (golint)
    • Line 90: warning: exported function TypeNotFound should have comment or be unexported (golint)
    • Line 98: warning: exported function FunctionNotFound should have comment or be unexported (golint)
    • Line 106: warning: exported function FunctionNotUnique should have comment or be unexported (golint)
    • sqlc/internal/config/python_type.go
    • Line 3: warning: exported type PythonType should have comment or be unexported (golint)
    • Line 8: warning: exported method PythonType.IsSet should have comment or be unexported (golint)
    • Line 12: warning: exported method PythonType.TypeString should have comment or be unexported (golint)
    • sqlc/internal/sql/ast/alter_table_type.go
    • Line 3: warning: don't use underscores in Go names; type AlterTableType_PG should be AlterTableTypePG (golint)
    • Line 3: warning: exported type AlterTableType_PG should have comment or be unexported (golint)
    • Line 5: warning: exported method AlterTableType_PG.Pos should have comment or be unexported (golint)
    • sqlc/internal/metadata/meta.go
    • Line 9: warning: exported type CommentSyntax should have comment or be unexported (golint)
    • Line 16: warning: exported const CmdExec should have comment (or a comment on this block) or be unexported (golint)
    • Line 42: warning: exported function Parse should have comment or be unexported (golint)
    • sqlc/internal/compiler/query_catalog.go
    • Line 10: warning: exported type QueryCatalog should have comment or be unexported (golint)
    • Line 49: warning: exported function ConvertColumn should have comment or be unexported (golint)
    • Line 61: warning: exported method QueryCatalog.GetTable should have comment or be unexported (golint)
    • Line 77: warning: exported method QueryCatalog.GetFunc should have comment or be unexported (golint)
    • sqlc/internal/sql/ast/a_star.go
    • Line 3: warning: don't use underscores in Go names; type A_Star should be AStar (golint)
    • Line 3: warning: exported type A_Star should have comment or be unexported (golint)
    • Line 6: warning: exported method A_Star.Pos should have comment or be unexported (golint)
    • sqlc/internal/engine/sqlite/parse.go
    • Line 35: warning: exported function NewParser should have comment or be unexported (golint)
    • Line 39: warning: exported type Parser should have comment or be unexported (golint)
    • Line 42: warning: exported method Parser.Parse should have comment or be unexported (golint)
    • Line 87: warning: exported method Parser.CommentSyntax should have comment or be unexported (golint)
    • sqlc/internal/codegen/golang/query.go
    • Line 9: warning: exported type QueryValue should have comment or be unexported (golint)
    • Line 17: warning: exported method QueryValue.EmitStruct should have comment or be unexported (golint)
    • Line 21: warning: exported method QueryValue.IsStruct should have comment or be unexported (golint)
    • Line 29: warning: exported method QueryValue.Pair should have comment or be unexported (golint)
    • Line 36: warning: exported method QueryValue.Type should have comment or be unexported (golint)
    • Line 46: warning: exported method QueryValue.Params should have comment or be unexported (golint)
    • Line 73: warning: exported method QueryValue.Scan should have comment or be unexported (golint)
    • Line 97: warning: comment on exported type Query should be of the form "Query ..." (with optional leading article) (golint)
    • sqlc/internal/sqltest/mysql.go
    • Line 13: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 16: warning: exported function MySQL should have comment or be unexported (golint)
    • sqlc/internal/sql/ast/alter_table_cmd.go
    • Line 4: warning: don't use underscores in Go names; const AT_AddColumn should be ATAddColumn (golint)
    • Line 4: warning: exported const AT_AddColumn should have comment (or a comment on this block) or be unexported (golint)
    • Line 5: warning: don't use underscores in Go names; const AT_AlterColumnType should be ATAlterColumnType (golint)
    • Line 6: warning: don't use underscores in Go names; const AT_DropColumn should be ATDropColumn (golint)
    • Line 7: warning: don't use underscores in Go names; const AT_DropNotNull should be ATDropNotNull (golint)
    • Line 8: warning: don't use underscores in Go names; const AT_SetNotNull should be ATSetNotNull (golint)
    • Line 11: warning: exported type AlterTableType should have comment or be unexported (golint)
    • Line 30: warning: exported type AlterTableCmd should have comment or be unexported (golint)
    • Line 39: warning: exported method AlterTableCmd.Pos should have comment or be unexported (golint)
    • sqlc/internal/sql/info/info.go
    • Line 7: warning: comment on exported function Newo should be of the form "Newo ..." (golint)
    • Line 12: warning: exported type InformationSchema should have comment or be unexported (golint)
    • Line 16: warning: exported type Table should have comment or be unexported (golint)
    • Line 22: warning: comment on exported method InformationSchema.Tables should be of the form "Tables ..." (golint)
    • Line 37: warning: exported type Column should have comment or be unexported (golint)
    • Line 46: warning: comment on exported method InformationSchema.Columns should be of the form "Columns ..." (golint)
    • Line 51: warning: exported type Schema should have comment or be unexported (golint)
    • Line 56: warning: comment on exported method InformationSchema.Schemata should be of the form "Schemata ..." (golint)
    • sqlc/internal/codegen/golang/driver.go
    • Line 5: warning: exported type SQLDriver should have comment or be unexported (golint)
    • Line 8: warning: exported const SQLDriverPGXV4 should have comment (or a comment on this block) or be unexported (golint)
    • Line 15: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • sqlc/internal/engine/postgresql/convert.go
    • Line 100: warning: don't use underscores in Go names; func convertA_ArrayExpr should be convertAArrayExpr (golint)
    • Line 110: warning: don't use underscores in Go names; func convertA_Const should be convertAConst (golint)
    • Line 120: warning: don't use underscores in Go names; func convertA_Expr should be convertAExpr (golint)
    • Line 133: warning: don't use underscores in Go names; func convertA_Indices should be convertAIndices (golint)
    • Line 144: warning: don't use underscores in Go names; func convertA_Indirection should be convertAIndirection (golint)
    • Line 154: warning: don't use underscores in Go names; func convertA_Star should be convertAStar (golint)
    • sqlc/internal/multierr/error.go
    • Line 10: warning: exported type FileError should have comment or be unexported (golint)
    • Line 21: warning: exported type Error should have comment or be unexported (golint)
    • Line 25: warning: exported method Error.Add should have comment or be unexported (golint)
    • Line 42: warning: exported method Error.Errs should have comment or be unexported (golint)
    • Line 50: warning: exported function New should have comment or be unexported (golint)
    • sqlc/internal/sql/catalog/catalog.go
    • Line 20: warning: exported type Catalog should have comment or be unexported (golint)
    • Line 87: warning: exported type Schema should have comment or be unexported (golint)
    • Line 183: warning: exported type Table should have comment or be unexported (golint)
    • Line 189: warning: comment on exported type Column should be of the form "Column ..." (with optional leading article) (golint)
    • Line 199: warning: exported type Type should have comment or be unexported (golint)
    • Line 205: warning: exported type Enum should have comment or be unexported (golint)
    • Line 211: warning: exported method Enum.SetComment should have comment or be unexported (golint)
    • Line 218: warning: exported type CompositeType should have comment or be unexported (golint)
    • Line 226: warning: exported method CompositeType.SetComment should have comment or be unexported (golint)
    • Line 230: warning: exported type Function should have comment or be unexported (golint)
    • Line 238: warning: exported method Function.InArgs should have comment or be unexported (golint)
    • Line 251: warning: exported type Argument should have comment or be unexported (golint)
    • Line 258: warning: exported function New should have comment or be unexported (golint)
    • Line 268: warning: exported method Catalog.Build should have comment or be unexported (golint)
    • Line 284: warning: exported method Catalog.Update should have comment or be unexported (golint)
    • sqlc/internal/engine/dolphin/parse.go
    • Line 12: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 19: warning: exported function NewParser should have comment or be unexported (golint)
    • Line 23: warning: exported type Parser should have comment or be unexported (golint)
    • Line 52: warning: exported method Parser.Parse should have comment or be unexported (golint)
    • Line 84: warning: comment on exported method Parser.CommentSyntax should be of the form "CommentSyntax ..." (golint)
    • sqlc/internal/sql/named/is.go
    • Line 8: warning: exported function IsParamFunc should have comment or be unexported (golint)
    • Line 19: warning: exported function IsParamSign should have comment or be unexported (golint)
    • sqlc/internal/codegen/python/gen.go
    • Line 21: warning: exported type Constant should have comment or be unexported (golint)
    • Line 27: warning: exported type Enum should have comment or be unexported (golint)
    • Line 50: warning: exported type Field should have comment or be unexported (golint)
    • Line 56: warning: exported type Struct should have comment or be unexported (golint)
    • Line 63: warning: exported type QueryValue should have comment or be unexported (golint)
    • Line 70: warning: exported method QueryValue.EmitStruct should have comment or be unexported (golint)
    • Line 74: warning: exported method QueryValue.IsStruct should have comment or be unexported (golint)
    • Line 82: warning: exported method QueryValue.Pair should have comment or be unexported (golint)
    • Line 89: warning: exported method QueryValue.Type should have comment or be unexported (golint)
    • Line 96: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 103: warning: exported method QueryValue.StructRowParser should have comment or be unexported (golint)
    • Line 116: warning: comment on exported type Query should be of the form "Query ..." (with optional leading article) (golint)
    • Line 129: warning: exported method Query.ArgPairs should have comment or be unexported (golint)
    • Line 144: warning: exported method Query.ArgDict should have comment or be unexported (golint)
    • Line 202: warning: exported function ModelName should have comment or be unexported (golint)
    • Line 216: warning: exported function MethodName should have comment or be unexported (golint)
    • Line 654: warning: exported function HashComment should have comment or be unexported (golint)
    • Line 658: warning: exported function Generate should have comment or be unexported (golint)
    • sqlc/internal/sql/ast/a_expr.go
    • Line 3: warning: don't use underscores in Go names; type A_Expr should be AExpr (golint)
    • Line 3: warning: exported type A_Expr should have comment or be unexported (golint)
    • Line 11: warning: exported method A_Expr.Pos should have comment or be unexported (golint)
    • sqlc/internal/sql/ast/a_expr_kind.go
    • Line 3: warning: don't use underscores in Go names; type A_Expr_Kind should be AExprKind (golint)
    • Line 3: warning: exported type A_Expr_Kind should have comment or be unexported (golint)
    • Line 5: warning: exported method A_Expr_Kind.Pos should have comment or be unexported (golint)
    • sqlc/internal/codegen/golang/sql_package.go
    • Line 3: warning: exported type SQLPackage should have comment or be unexported (golint)
    • Line 6: warning: exported const SQLPackagePGX should have comment (or a comment on this block) or be unexported (golint)
    • Line 10: warning: exported function SQLPackageFromString should have comment or be unexported (golint)
    • sqlc/internal/codegen/utils.go
    • Line 8: warning: exported function LowerTitle should have comment or be unexported (golint)
    • Line 18: warning: exported function Title should have comment or be unexported (golint)
    • Line 22: warning: comment on exported function EscapeBacktick should be of the form "EscapeBacktick ..." (golint)
    • Line 38: warning: exported function DoubleSlashComment should have comment or be unexported (golint)
    • sqlc/internal/sql/ast/sub_link.go
    • Line 3: warning: exported type SubLinkType should have comment or be unexported (golint)
    • Line 6: warning: exported const EXISTS_SUBLINK should have comment (or a comment on this block) or be unexported (golint)
    • Line 16: warning: exported type SubLink should have comment or be unexported (golint)
    • Line 26: warning: exported method SubLink.Pos should have comment or be unexported (golint)
    • sqlc/internal/engine/postgresql/parse.go
    • Line 145: warning: exported function NewParser should have comment or be unexported (golint)
    • Line 149: warning: exported type Parser should have comment or be unexported (golint)
    • Line 154: warning: exported method Parser.Parse should have comment or be unexported (golint)
    • Line 187: warning: comment on exported method Parser.CommentSyntax should be of the form "CommentSyntax ..." (golint)
    • Line 210: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • sqlc/internal/sql/astutils/walk.go
    • Line 9: warning: exported type Visitor should have comment or be unexported (golint)
    • Line 13: warning: exported type VisitorFunc should have comment or be unexported (golint)
    • Line 15: warning: exported method VisitorFunc.Visit should have comment or be unexported (golint)
    • Line 20: warning: exported function Walk should have comment or be unexported (golint)
    • sqlc/internal/config/go_type.go
    • Line 11: warning: exported type GoType should have comment or be unexported (golint)
    • Line 20: warning: exported type ParsedGoType should have comment or be unexported (golint)
    • Line 27: warning: exported method GoType.UnmarshalJSON should have comment or be unexported (golint)
    • Line 42: warning: exported method GoType.UnmarshalYAML should have comment or be unexported (golint)
    • Line 75: warning: comment on exported method GoType.Parse should be of the form "Parse ..." (golint)
    • Line 76: warning: receiver name gt should be consistent with previous receiver name o for GoType (golint)
    • sqlc/internal/compiler/query.go
    • Line 7: warning: exported type Function should have comment or be unexported (golint)
    • Line 12: warning: exported type Table should have comment or be unexported (golint)
    • Line 17: warning: exported type Column should have comment or be unexported (golint)
    • Line 33: warning: exported type Query should have comment or be unexported (golint)
    • Line 45: warning: exported type Parameter should have comment or be unexported (golint)
    • sqlc/internal/sql/ast/func_param.go
    • Line 3: warning: exported type FuncParamMode should have comment or be unexported (golint)
    • Line 6: warning: exported const FuncParamIn should have comment (or a comment on this block) or be unexported (golint)
    • Line 13: warning: exported type FuncParam should have comment or be unexported (golint)
    • Line 20: warning: exported method FuncParam.Pos should have comment or be unexported (golint)
    • sqlc/internal/codegen/golang/field.go
    • Line 11: warning: exported type Field should have comment or be unexported (golint)
    • Line 18: warning: exported method Field.Tag should have comment or be unexported (golint)
    • Line 30: warning: exported function JSONTagName should have comment or be unexported (golint)
    • Line 34: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 39: warning: exported function SetCaseStyle should have comment or be unexported (golint)
    • sqlc/internal/sql/ast/typedefs.go
    • Line 3: warning: exported type AclMode should have comment or be unexported (golint)
    • Line 5: warning: exported method AclMode.Pos should have comment or be unexported (golint)
    • Line 9: warning: exported type DistinctExpr should have comment or be unexported (golint)
    • Line 11: warning: exported method DistinctExpr.Pos should have comment or be unexported (golint)
    • Line 15: warning: exported type NullIfExpr should have comment or be unexported (golint)
    • Line 17: warning: exported method NullIfExpr.Pos should have comment or be unexported (golint)
    • Line 21: warning: exported type Selectivity should have comment or be unexported (golint)
    • Line 23: warning: exported method Selectivity.Pos should have comment or be unexported (golint)
    • Line 27: warning: exported type Cost should have comment or be unexported (golint)
    • Line 29: warning: exported method Cost.Pos should have comment or be unexported (golint)
    • Line 33: warning: exported type ParamListInfo should have comment or be unexported (golint)
    • Line 35: warning: exported method ParamListInfo.Pos should have comment or be unexported (golint)
    • Line 39: warning: exported type AttrNumber should have comment or be unexported (golint)
    • Line 41: warning: exported method AttrNumber.Pos should have comment or be unexported (golint)
    • Line 45: warning: exported type Pointer should have comment or be unexported (golint)
    • Line 47: warning: exported method Pointer.Pos should have comment or be unexported (golint)
    • Line 51: warning: exported type Index should have comment or be unexported (golint)
    • Line 53: warning: exported method Index.Pos should have comment or be unexported (golint)
    • Line 57: warning: exported type Offset should have comment or be unexported (golint)
    • Line 59: warning: exported method Offset.Pos should have comment or be unexported (golint)
    • Line 69: warning: exported type RegProcedure should have comment or be unexported (golint)
    • Line 71: warning: exported method RegProcedure.Pos should have comment or be unexported (golint)
    • Line 75: warning: exported type TransactionId should have comment or be unexported (golint)
    • Line 77: warning: exported method TransactionId.Pos should have comment or be unexported (golint)
    • Line 81: warning: exported type LocalTransactionId should have comment or be unexported (golint)
    • Line 83: warning: exported method LocalTransactionId.Pos should have comment or be unexported (golint)
    • Line 87: warning: exported type SubTransactionId should have comment or be unexported (golint)
    • Line 89: warning: exported method SubTransactionId.Pos should have comment or be unexported (golint)
    • Line 93: warning: exported type MultiXactId should have comment or be unexported (golint)
    • Line 95: warning: exported method MultiXactId.Pos should have comment or be unexported (golint)
    • Line 99: warning: exported type MultiXactOffset should have comment or be unexported (golint)
    • Line 101: warning: exported method MultiXactOffset.Pos should have comment or be unexported (golint)
    • Line 105: warning: exported type CommandId should have comment or be unexported (golint)
    • Line 107: warning: exported method CommandId.Pos should have comment or be unexported (golint)
    • Line 111: warning: exported type Datum should have comment or be unexported (golint)
    • Line 113: warning: exported method Datum.Pos should have comment or be unexported (golint)
    • Line 117: warning: exported type DatumPtr should have comment or be unexported (golint)
    • Line 119: warning: exported method DatumPtr.Pos should have comment or be unexported (golint)
    • Line 123: warning: exported type Oid should have comment or be unexported (golint)
    • Line 125: warning: exported method Oid.Pos should have comment or be unexported (golint)
    • Line 129: warning: exported type BlockNumber should have comment or be unexported (golint)
    • Line 131: warning: exported method BlockNumber.Pos should have comment or be unexported (golint)
    • Line 135: warning: exported type BlockId should have comment or be unexported (golint)
    • Line 137: warning: exported method BlockId.Pos should have comment or be unexported (golint)
    • sqlc/internal/cmd/cmd.go
    • Line 82: warning: exported type Env should have comment or be unexported (golint)
    • Line 86: warning: exported function ParseEnv should have comment or be unexported (golint)
    • Line 104: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • sqlc/internal/sqltest/postgres.go
    • Line 15: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 32: warning: exported function PostgreSQL should have comment or be unexported (golint)
    • sqlc/internal/config/config.go
    • Line 35: warning: exported type Engine should have comment or be unexported (golint)
    • Line 37: warning: exported type Paths should have comment or be unexported (golint)
    • Line 39: warning: exported method Paths.UnmarshalJSON should have comment or be unexported (golint)
    • Line 56: warning: exported method Paths.UnmarshalYAML should have comment or be unexported (golint)
    • Line 71: warning: exported const EngineMySQL should have comment (or a comment on this block) or be unexported (golint)
    • Line 74: warning: comment on exported const EngineXLemon should be of the form "EngineXLemon ..." (golint)
    • Line 78: warning: exported type Config should have comment or be unexported (golint)
    • Line 84: warning: exported type Gen should have comment or be unexported (golint)
    • Line 89: warning: exported type GenGo should have comment or be unexported (golint)
    • Line 94: warning: exported type GenKotlin should have comment or be unexported (golint)
    • Line 98: warning: exported type SQL should have comment or be unexported (golint)
    • Line 105: warning: exported type SQLGen should have comment or be unexported (golint)
    • Line 111: warning: exported type SQLGo should have comment or be unexported (golint)
    • Line 131: warning: exported type SQLKotlin should have comment or be unexported (golint)
    • Line 137: warning: exported type SQLPython should have comment or be unexported (golint)
    • Line 146: warning: exported type Override should have comment or be unexported (golint)
    • Line 155: warning: don't use underscores in Go names; struct field Deprecated_PostgresType should be DeprecatedPostgresType (golint)
    • Line 163: warning: don't use underscores in Go names; struct field Deprecated_Null should be DeprecatedNull (golint)
    • Line 176: warning: exported method Override.Parse should have comment or be unexported (golint)
    • Line 232: warning: exported var ErrMissingVersion should have comment or be unexported (golint)
    • Line 233: warning: exported var ErrUnknownVersion should have comment or be unexported (golint)
    • Line 234: warning: exported var ErrMissingEngine should have comment or be unexported (golint)
    • Line 235: warning: exported var ErrUnknownEngine should have comment or be unexported (golint)
    • Line 236: warning: exported var ErrNoPackages should have comment or be unexported (golint)
    • Line 237: warning: exported var ErrNoPackageName should have comment or be unexported (golint)
    • Line 238: warning: exported var ErrNoPackagePath should have comment or be unexported (golint)
    • Line 239: warning: exported var ErrNoOutPath should have comment or be unexported (golint)
    • Line 240: warning: exported var ErrNoQuerierType should have comment or be unexported (golint)
    • Line 242: warning: exported function ParseConfig should have comment or be unexported (golint)
    • Line 265: warning: exported type CombinedSettings should have comment or be unexported (golint)
    • Line 275: warning: exported function Combine should have comment or be unexported (golint)
    • sqlc/internal/codegen/golang/imports.go
    • Line 17: warning: exported type ImportSpec should have comment or be unexported (golint)
    • Line 25: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 184: warning: should omit 2nd value from range; this loop is equivalent to `for typeName := range ...` (golint)
    • Line 190: warning: should omit 2nd value from range; this loop is equivalent to `for typeName := range ...` (golint)
    • sqlc/internal/codegen/kotlin/gen.go
    • Line 34: warning: exported type Constant should have comment or be unexported (golint)
    • Line 40: warning: exported type Enum should have comment or be unexported (golint)
    • Line 46: warning: exported type Field should have comment or be unexported (golint)
    • Line 52: warning: exported type Struct should have comment or be unexported (golint)
    • Line 60: warning: exported type QueryValue should have comment or be unexported (golint)
    • Line 68: warning: exported method QueryValue.EmitStruct should have comment or be unexported (golint)
    • Line 72: warning: exported method QueryValue.IsStruct should have comment or be unexported (golint)
    • Line 80: warning: exported method QueryValue.Type should have comment or be unexported (golint)
    • Line 97: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 116: warning: exported type Params should have comment or be unexported (golint)
    • Line 124: warning: exported method Params.Args should have comment or be unexported (golint)
    • Line 138: warning: exported method Params.Bindings should have comment or be unexported (golint)
    • Line 175: warning: exported method QueryValue.ResultSet should have comment or be unexported (golint)
    • Line 207: warning: comment on exported type Query should be of the form "Query ..." (with optional leading article) (golint)
    • Line 266: warning: exported function DataClassName should have comment or be unexported (golint)
    • Line 277: warning: exported function MemberName should have comment or be unexported (golint)
    • Line 749: warning: exported function Offset should have comment or be unexported (golint)
    • Line 769: warning: exported function Generate should have comment or be unexported (golint)

gocyclo90%

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.

    • sqlc/internal/engine/dolphin/convert.go
    • Line 1176: warning: cyclomatic complexity 137 of function (*cc).convert() is high (> 15) (gocyclo)
    • Line 130: warning: cyclomatic complexity 20 of function opToName() is high (> 15) (gocyclo)
    • Line 28: warning: cyclomatic complexity 16 of function (*cc).convertAlterTableStmt() is high (> 15) (gocyclo)

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!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!