Preparing report...

Report for github.com/viant/dsunit

A+    Excellent!    Found 12 issues across 43 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!


gocyclo93%

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.

    • dsunit/service.go
    • Line 1054: warning: cyclomatic complexity 26 of function (*service).compare() is high (> 15) (gocyclo)
    • Line 248: warning: cyclomatic complexity 18 of function (*service).Init() is high (> 15) (gocyclo)
    • Line 555: warning: cyclomatic complexity 16 of function (*service).expect() is high (> 15) (gocyclo)
    • dsunit/mapper.go
    • Line 11: warning: cyclomatic complexity 16 of function (*Mapper).transform() is high (> 15) (gocyclo)

golint79%

Golint is a linter for Go source code.

    • dsunit/record.go
    • Line 9: warning: exported type Record should have comment or be unexported (golint)
    • Line 54: warning: comment on exported method Record.AsMap should be of the form "AsMap ..." (golint)
    • dsunit/static.go
    • Line 14: warning: comment on exported function RegisterFromURL should be of the form "RegisterFromURL ..." (golint)
    • Line 24: warning: comment on exported function RecreateFromURL should be of the form "RecreateFromURL ..." (golint)
    • Line 34: warning: comment on exported function RunSQLFromURL should be of the form "RunSQLFromURL ..." (golint)
    • Line 44: warning: comment on exported function RunScriptFromURL should be of the form "RunScriptFromURL ..." (golint)
    • Line 49: warning: comment on exported function AddTableMapping should be of the form "AddTableMapping ..." (golint)
    • Line 54: warning: comment on exported function AddTableMappingFromURL should be of the form "AddTableMappingFromURL ..." (golint)
    • Line 64: warning: comment on exported function InitFromURL should be of the form "InitFromURL ..." (golint)
    • Line 69: warning: comment on exported function Prepare should be of the form "Prepare ..." (golint)
    • Line 74: warning: comment on exported function PrepareFromURL should be of the form "PrepareFromURL ..." (golint)
    • Line 100: warning: comment on exported function Expect should be of the form "Expect ..." (golint)
    • Line 105: warning: comment on exported function ExpectFromURL should be of the form "ExpectFromURL ..." (golint)
    • dsunit/sv/parser.go
    • Line 16: warning: exported method SeparatedValueParser.Parse should have comment or be unexported (golint)
    • Line 90: warning: exported function NewSeparatedValueParser should have comment or be unexported (golint)
    • dsunit/dataset.go
    • Line 19: warning: exported const AutoincrementDirective should have comment (or a comment on this block) or be unexported (golint)
    • Line 24: warning: comment on exported type Dataset should be of the form "Dataset ..." (with optional leading article) (golint)
    • Line 41: warning: comment on exported method Records.Expand should be of the form "Expand ..." (golint)
    • Line 115: warning: comment on exported method Records.Autoincrement should be of the form "Autoincrement ..." (golint)
    • Line 190: warning: comment on exported method DatasetResource.Load should be of the form "Load ..." (golint)
    • Line 215: warning: exported method DatasetResource.Init should have comment or be unexported (golint)
    • Line 299: warning: exported function NewDatasetResource should have comment or be unexported (golint)
    • dsunit/contract.go
    • Line 29: warning: exported method BaseResponse.SetError should have comment or be unexported (golint)
    • Line 37: warning: exported function NewBaseResponse should have comment or be unexported (golint)
    • Line 44: warning: exported function NewBaseOkResponse should have comment or be unexported (golint)
    • Line 58: warning: exported method RegisterRequest.Init should have comment or be unexported (golint)
    • Line 68: warning: exported method RegisterRequest.Validate should have comment or be unexported (golint)
    • Line 89: warning: exported function NewRegisterRequestFromURL should have comment or be unexported (golint)
    • Line 152: warning: comment on exported type RunSQLResponse should be of the form "RunSQLResponse ..." (with optional leading article) (golint)
    • Line 204: warning: exported method MappingRequest.Validate should have comment or be unexported (golint)
    • Line 250: warning: exported method InitRequest.Init should have comment or be unexported (golint)
    • Line 276: warning: exported method InitRequest.Validate should have comment or be unexported (golint)
    • Line 402: warning: comment on exported type DatasetValidation should be of the form "DatasetValidation ..." (with optional leading article) (golint)
    • Line 424: warning: exported function NewSequenceRequest should have comment or be unexported (golint)
    • Line 445: warning: exported function NewQueryRequest should have comment or be unexported (golint)
    • Line 472: warning: exported method FreezeRequest.Init should have comment or be unexported (golint)
    • Line 518: warning: exported type DatastoreSQL should have comment or be unexported (golint)
    • Line 533: warning: exported method CompareRequest.Init should have comment or be unexported (golint)
    • Line 560: warning: exported method CompareRequest.ApplyDirective should have comment or be unexported (golint)
    • Line 597: warning: exported type SchemaTarget should have comment or be unexported (golint)
    • Line 612: warning: exported type SchemaTableCheck should have comment or be unexported (golint)
    • dsunit/mapper.go
    • Line 7: warning: exported type Mapper should have comment or be unexported (golint)
    • Line 64: warning: exported method Mapper.Add should have comment or be unexported (golint)
    • Line 68: warning: exported method Mapper.Has should have comment or be unexported (golint)
    • Line 73: warning: exported method Mapper.Map should have comment or be unexported (golint)
    • Line 94: warning: exported function NewMapper should have comment or be unexported (golint)
    • dsunit/tester.go
    • Line 10: warning: exported var LogF should have comment or be unexported (golint)
    • Line 12: warning: exported type Tester should have comment or be unexported (golint)
    • dsunit/client.go
    • Line 127: warning: receiver name s should be consistent with previous receiver name c for serviceClient (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign95%

IneffAssign detects ineffectual assignments in Go code.

    • dsunit/service.go
    • Line 349: warning: ineffectual assignment to err (ineffassign)
    • Line 544: warning: ineffectual assignment to err (ineffassign)
    • Line 897: warning: ineffectual assignment to err (ineffassign)

misspell95%

Misspell Finds commonly misspelled English words