Preparing report...

Report for github.com/artpar/api2go

A    Great!    Found 14 issues across 29 files

Tweet

gofmt75%

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!


gocyclo86%

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.

    • api2go/api.go
    • Line 225: warning: cyclomatic complexity 27 of function (*API).addResource() is high (> 15) (gocyclo)
    • Line 694: warning: cyclomatic complexity 16 of function (*resource).handleUpdate() is high (> 15) (gocyclo)
    • Line 77: warning: cyclomatic complexity 16 of function (paginationQueryParams).getLinks() is high (> 15) (gocyclo)

golint82%

Golint is a linter for Go source code.

    • api2go/base_tables.go
    • Line 12: warning: exported type TableRelationInterface should have comment or be unexported (golint)
    • Line 18: warning: exported type TableRelation should have comment or be unexported (golint)
    • Line 31: warning: exported method TableRelation.Hash should have comment or be unexported (golint)
    • Line 35: warning: exported method TableRelation.GetSubjectName should have comment or be unexported (golint)
    • Line 42: warning: exported method TableRelation.GetSubject should have comment or be unexported (golint)
    • Line 46: warning: exported method TableRelation.GetJoinTableName should have comment or be unexported (golint)
    • Line 50: warning: exported method TableRelation.GetJoinString should have comment or be unexported (golint)
    • Line 71: warning: exported method TableRelation.GetReverseJoinString should have comment or be unexported (golint)
    • Line 94: warning: exported method TableRelation.GetRelation should have comment or be unexported (golint)
    • Line 98: warning: exported method TableRelation.GetObjectName should have comment or be unexported (golint)
    • Line 105: warning: exported method TableRelation.GetObject should have comment or be unexported (golint)
    • Line 109: warning: exported function NewTableRelation should have comment or be unexported (golint)
    • Line 119: warning: exported function NewTableRelationWithNames should have comment or be unexported (golint)
    • Line 129: warning: exported type Api2GoModel should have comment or be unexported (golint)
    • Line 142: warning: exported type DeleteReferenceInfo should have comment or be unexported (golint)
    • Line 147: warning: exported method Api2GoModel.GetNextVersion should have comment or be unexported (golint)
    • Line 150: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 158: warning: exported method Api2GoModel.HasVersion should have comment or be unexported (golint)
    • Line 168: warning: exported method Api2GoModel.GetCurrentVersion should have comment or be unexported (golint)
    • Line 171: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 176: warning: exported method Api2GoModel.GetColumnMap should have comment or be unexported (golint)
    • Line 176: warning: receiver name a should be consistent with previous receiver name g for Api2GoModel (golint)
    • Line 190: warning: exported method Api2GoModel.HasColumn should have comment or be unexported (golint)
    • Line 190: warning: receiver name a should be consistent with previous receiver name g for Api2GoModel (golint)
    • Line 207: warning: exported method Api2GoModel.HasMany should have comment or be unexported (golint)
    • Line 207: warning: receiver name a should be consistent with previous receiver name g for Api2GoModel (golint)
    • Line 222: warning: exported method Api2GoModel.GetRelations should have comment or be unexported (golint)
    • Line 222: warning: receiver name a should be consistent with previous receiver name g for Api2GoModel (golint)
    • Line 226: warning: exported type ValueOptions should have comment or be unexported (golint)
    • Line 232: warning: exported type ColumnInfo should have comment or be unexported (golint)
    • Line 251: warning: exported type ForeignKeyData should have comment or be unexported (golint)
    • Line 257: warning: comment on exported method ForeignKeyData.Scan should be of the form "Scan ..." (golint)
    • Line 286: warning: exported function NewApi2GoModelWithData should have comment or be unexported (golint)
    • Line 305: warning: exported function NewApi2GoModel should have comment or be unexported (golint)
    • Line 316: warning: exported function EndsWith should have comment or be unexported (golint)
    • Line 333: warning: exported function EndsWithCheck should have comment or be unexported (golint)
    • Line 348: warning: exported method Api2GoModel.SetToOneReferenceID should have comment or be unexported (golint)
    • Line 348: warning: receiver name m should be consistent with previous receiver name g for Api2GoModel (golint)
    • Line 423: warning: exported method Api2GoModel.AddToManyIDs should have comment or be unexported (golint)
    • Line 423: warning: receiver name m should be consistent with previous receiver name g for Api2GoModel (golint)
    • Line 430: warning: exported method Api2GoModel.DeleteToManyIDs should have comment or be unexported (golint)
    • Line 430: warning: receiver name m should be consistent with previous receiver name g for Api2GoModel (golint)
    • Line 473: warning: exported method Api2GoModel.SetToManyReferenceIDs should have comment or be unexported (golint)
    • Line 473: warning: receiver name m should be consistent with previous receiver name g for Api2GoModel (golint)
    • Line 523: warning: exported method Api2GoModel.GetReferencedStructs should have comment or be unexported (golint)
    • Line 523: warning: receiver name m should be consistent with previous receiver name g for Api2GoModel (golint)
    • Line 528: warning: exported method Api2GoModel.GetReferencedIDs should have comment or be unexported (golint)
    • Line 528: warning: receiver name m should be consistent with previous receiver name g for Api2GoModel (golint)
    • Line 615: warning: exported method Api2GoModel.GetReferences should have comment or be unexported (golint)
    • Line 615: warning: receiver name model should be consistent with previous receiver name g for Api2GoModel (golint)
    • Line 681: warning: exported method Api2GoModel.GetAttributes should have comment or be unexported (golint)
    • Line 681: warning: receiver name m should be consistent with previous receiver name g for Api2GoModel (golint)
    • Line 705: warning: exported method Api2GoModel.GetAllAsAttributes should have comment or be unexported (golint)
    • Line 705: warning: receiver name m should be consistent with previous receiver name g for Api2GoModel (golint)
    • Line 716: warning: exported method Api2GoModel.InitializeObject should have comment or be unexported (golint)
    • Line 716: warning: receiver name m should be consistent with previous receiver name g for Api2GoModel (golint)
    • Line 721: warning: exported method Api2GoModel.SetColumns should have comment or be unexported (golint)
    • Line 721: warning: receiver name m should be consistent with previous receiver name g for Api2GoModel (golint)
    • Line 726: warning: exported method Api2GoModel.GetColumns should have comment or be unexported (golint)
    • Line 726: warning: receiver name m should be consistent with previous receiver name g for Api2GoModel (golint)
    • Line 730: warning: exported method Api2GoModel.GetColumnNames should have comment or be unexported (golint)
    • Line 730: warning: receiver name m should be consistent with previous receiver name g for Api2GoModel (golint)
    • Line 740: warning: exported method Api2GoModel.GetDefaultPermission should have comment or be unexported (golint)
    • Line 745: warning: exported method Api2GoModel.GetName should have comment or be unexported (golint)
    • Line 749: warning: exported method Api2GoModel.GetTableName should have comment or be unexported (golint)
    • Line 753: warning: exported method Api2GoModel.GetID should have comment or be unexported (golint)
    • Line 760: warning: exported method Api2GoModel.SetAttributes should have comment or be unexported (golint)
    • Line 787: warning: exported type Change should have comment or be unexported (golint)
    • Line 792: warning: exported method Api2GoModel.GetAuditModel should have comment or be unexported (golint)
    • Line 827: warning: exported method Api2GoModel.GetChanges should have comment or be unexported (golint)
    • Line 844: warning: exported method Api2GoModel.IsDirty should have comment or be unexported (golint)
    • Line 848: warning: exported method Api2GoModel.GetUnmodifiedAttributes should have comment or be unexported (golint)
    • Line 855: warning: exported method Api2GoModel.SetID should have comment or be unexported (golint)
    • Line 864: warning: exported type HasId should have comment or be unexported (golint)
    • Line 868: warning: exported method Api2GoModel.GetReferenceId should have comment or be unexported (golint)
    • Line 872: warning: exported method Api2GoModel.BeforeCreate should have comment or be unexported (golint)
    • api2go/error.go
    • Line 85: warning: comment on exported method HTTPError.Status should be of the form "Status ..." (golint)
    • api2go/examples/model/model_chocolate.go
    • Line 11: warning: exported method Chocolate.GetAttributes should have comment or be unexported (golint)
    • Line 18: warning: receiver name c should be consistent with previous receiver name s for Chocolate (golint)
    • Line 23: warning: receiver name c should be consistent with previous receiver name s for Chocolate (golint)
    • api2go/examples/model/model_user.go
    • Line 20: warning: exported method User.GetAttributes should have comment or be unexported (golint)
    • Line 27: warning: receiver name u should be consistent with previous receiver name s for User (golint)
    • Line 32: warning: receiver name u should be consistent with previous receiver name s for User (golint)
    • Line 38: warning: receiver name u should be consistent with previous receiver name s for User (golint)
    • Line 48: warning: receiver name u should be consistent with previous receiver name s for User (golint)
    • Line 62: warning: receiver name u should be consistent with previous receiver name s for User (golint)
    • Line 72: warning: receiver name u should be consistent with previous receiver name s for User (golint)
    • Line 82: warning: receiver name u should be consistent with previous receiver name s for User (golint)
    • Line 92: warning: receiver name u should be consistent with previous receiver name s for User (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign93%

IneffAssign detects ineffectual assignments in Go code.


misspell89%

Misspell Finds commonly misspelled English words

    • api2go/error.go
    • Line 44: warning: "Paramter" is a misspelling of "Parameter" (misspell)
    • Line 75: warning: "represenation" is a misspelling of "representation" (misspell)
    • Line 85: warning: "represenation" is a misspelling of "representation" (misspell)