Preparing report...

Report for github.com/programmfabrik/apitest

A    Great!    Found 27 issues across 44 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!


gocyclo75%

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.

    • apitest/api_testcase.go
    • Line 334: warning: cyclomatic complexity 26 of function (Case).run() is high (> 15) (gocyclo)
    • Line 216: warning: cyclomatic complexity 16 of function (Case).executeRequest() is high (> 15) (gocyclo)
    • apitest/pkg/lib/compare/comparison_functions.go
    • Line 463: warning: cyclomatic complexity 35 of function keyChecks() is high (> 15) (gocyclo)
    • Line 33: warning: cyclomatic complexity 34 of function fillComparisonContext() is high (> 15) (gocyclo)
    • Line 312: warning: cyclomatic complexity 25 of function arrayComparison() is high (> 15) (gocyclo)
    • Line 187: warning: cyclomatic complexity 22 of function objectComparison() is high (> 15) (gocyclo)
    • apitest/api_testsuite.go
    • Line 197: warning: cyclomatic complexity 18 of function (*Suite).parseAndRunTest() is high (> 15) (gocyclo)
    • Line 56: warning: cyclomatic complexity 16 of function NewTestSuite() is high (> 15) (gocyclo)
    • apitest/pkg/lib/template/template_funcs.go
    • Line 68: warning: cyclomatic complexity 19 of function add() is high (> 15) (gocyclo)
    • Line 212: warning: cyclomatic complexity 17 of function divide() is high (> 15) (gocyclo)
    • Line 166: warning: cyclomatic complexity 17 of function multiply() is high (> 15) (gocyclo)
    • Line 122: warning: cyclomatic complexity 17 of function subtract() is high (> 15) (gocyclo)

golint45%

Golint is a linter for Go source code.

    • apitest/pkg/lib/csv/csv.go
    • Line 21: warning: exported function CSVToMap should have comment or be unexported (golint)
    • Line 77: warning: exported function GenericCSVToMap should have comment or be unexported (golint)
    • apitest/pkg/lib/compare/comparison_functions.go
    • Line 14: warning: exported type ComparisonContext should have comment or be unexported (golint)
    • Line 428: warning: exported function ObjectEqualWithControl should have comment or be unexported (golint)
    • Line 437: warning: exported function ArrayEqualWithControl should have comment or be unexported (golint)
    • Line 448: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 456: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • apitest/pkg/lib/util/path_util.go
    • Line 11: warning: exported function GetAbsPath should have comment or be unexported (golint)
    • Line 15: warning: exported function IsPathSpec should have comment or be unexported (golint)
    • Line 31: warning: exported function IsParallelPathSpec should have comment or be unexported (golint)
    • apitest/pkg/lib/api/request.go
    • Line 38: warning: exported type RequestCookie should have comment or be unexported (golint)
    • Line 43: warning: exported type Request should have comment or be unexported (golint)
    • Line 264: warning: exported method Request.ToString should have comment or be unexported (golint)
    • Line 312: warning: exported method Request.Send should have comment or be unexported (golint)
    • apitest/api_testsuite.go
    • Line 192: warning: exported type TestContainer should have comment or be unexported (golint)
    • Line 273: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • apitest/pkg/lib/filesystem/TestFs.go
    • Line 10: warning: exported type TestFs should have comment or be unexported (golint)
    • Line 25: warning: exported function NewTestFs should have comment or be unexported (golint)
    • Line 29: warning: exported method TestFs.Name should have comment or be unexported (golint)
    • Line 33: warning: exported method TestFs.Create should have comment or be unexported (golint)
    • Line 41: warning: exported method TestFs.Mkdir should have comment or be unexported (golint)
    • Line 49: warning: exported method TestFs.MkdirAll should have comment or be unexported (golint)
    • Line 57: warning: exported method TestFs.Open should have comment or be unexported (golint)
    • Line 65: warning: exported method TestFs.OpenFile should have comment or be unexported (golint)
    • Line 73: warning: exported method TestFs.Remove should have comment or be unexported (golint)
    • Line 81: warning: exported method TestFs.RemoveAll should have comment or be unexported (golint)
    • Line 89: warning: exported method TestFs.Rename should have comment or be unexported (golint)
    • Line 97: warning: exported method TestFs.Stat should have comment or be unexported (golint)
    • Line 105: warning: exported method TestFs.Chmod should have comment or be unexported (golint)
    • Line 113: warning: exported method TestFs.Chtimes should have comment or be unexported (golint)
    • apitest/pkg/lib/report/report.go
    • Line 13: warning: exported type Report should have comment or be unexported (golint)
    • Line 18: warning: exported method Report.Root should have comment or be unexported (golint)
    • Line 22: warning: exported function NewReport should have comment or be unexported (golint)
    • Line 43: warning: comment on exported method Report.DidFail should be of the form "DidFail ..." (golint)
    • Line 48: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 53: warning: exported method Report.GetLog should have comment or be unexported (golint)
    • Line 57: warning: exported type ReportElement should have comment or be unexported (golint)
    • Line 72: warning: exported type ReportElements should have comment or be unexported (golint)
    • Line 74: warning: exported method ReportElements.Flat should have comment or be unexported (golint)
    • Line 108: warning: exported method ReportElement.SetName should have comment or be unexported (golint)
    • Line 115: warning: exported method ReportElement.Leave should have comment or be unexported (golint)
    • Line 143: warning: exported method ReportElement.GetLog should have comment or be unexported (golint)
    • Line 158: warning: exported method ReportElement.SaveToReportLog should have comment or be unexported (golint)
    • Line 171: warning: exported method ReportElement.SaveToReportLogF should have comment or be unexported (golint)
    • apitest/pkg/lib/util/file.go
    • Line 32: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 50: warning: exported function LocalPath should have comment or be unexported (golint)
    • apitest/pkg/lib/api/pre_process.go
    • Line 12: warning: exported type CmdOutputType should have comment or be unexported (golint)
    • Line 15: warning: exported const CmdOutputStdout should have comment (or a comment on this block) or be unexported (golint)
    • Line 20: warning: exported type PreProcess should have comment or be unexported (golint)
    • Line 35: warning: exported method PreProcess.RunPreProcess should have comment or be unexported (golint)
    • apitest/config.go
    • Line 17: warning: exported type ConfigStruct should have comment or be unexported (golint)
    • Line 32: warning: exported var Config should have comment or be unexported (golint)
    • Line 36: warning: exported function LoadConfig should have comment or be unexported (golint)
    • apitest/pkg/lib/api/response.go
    • Line 24: warning: exported type Response should have comment or be unexported (golint)
    • Line 46: warning: exported type ResponseSerialization should have comment or be unexported (golint)
    • Line 55: warning: exported type ResponseFormat should have comment or be unexported (golint)
    • Line 64: warning: exported function NewResponse should have comment or be unexported (golint)
    • Line 72: warning: exported function NewResponseFromSpec should have comment or be unexported (golint)
    • Line 279: warning: exported method Response.ServerResponseToJsonString should have comment or be unexported (golint)
    • Line 291: warning: exported method Response.Body should have comment or be unexported (golint)
    • Line 315: warning: exported method Response.ToString should have comment or be unexported (golint)
    • apitest/pkg/lib/datastore/datastore.go
    • Line 15: warning: exported type Datastore should have comment or be unexported (golint)
    • Line 22: warning: exported function NewStore should have comment or be unexported (golint)
    • Line 31: warning: exported type DatastoreKeyNotFoundError should have comment or be unexported (golint)
    • Line 39: warning: exported type DatastoreIndexOutOfBoundsError should have comment or be unexported (golint)
    • Line 47: warning: exported type DatastoreIndexError should have comment or be unexported (golint)
    • Line 81: warning: exported method Datastore.Delete should have comment or be unexported (golint)
    • Line 85: warning: comment on exported method Datastore.UpdateLastResponse should be of the form "UpdateLastResponse ..." (golint)
    • Line 90: warning: comment on exported method Datastore.AppendResponse should be of the form "AppendResponse ..." (golint)
    • Line 95: warning: exported method Datastore.SetMap should have comment or be unexported (golint)
    • Line 105: warning: exported method Datastore.Set should have comment or be unexported (golint)
    • Line 123: warning: don't use underscores in Go names; var use_index should be useIndex (golint)
    • Line 144: warning: don't use underscores in Go names; var use_index should be useIndex (golint)
    • Line 169: warning: exported method Datastore.Get should have comment or be unexported (golint)
    • Line 198: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 217: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • apitest/pkg/lib/test_utils/test_utils.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 17: warning: exported var TestServer should have comment or be unexported (golint)
    • Line 32: warning: exported var TestClient should have comment or be unexported (golint)
    • Line 34: warning: exported type LoggingMessage should have comment or be unexported (golint)
    • Line 39: warning: exported type LoggingRegexAssertion should have comment or be unexported (golint)
    • Line 44: warning: exported type LoggingRegexAssertions should have comment or be unexported (golint)
    • Line 81: warning: exported function AssertLoggingEqualsRegex should have comment or be unexported (golint)
    • apitest/pkg/lib/util/json_types.go
    • Line 3: warning: exported type JsonObject should have comment or be unexported (golint)
    • Line 4: warning: exported type JsonArray should have comment or be unexported (golint)
    • Line 5: warning: exported type JsonString should have comment or be unexported (golint)
    • Line 6: warning: exported type JsonNumber should have comment or be unexported (golint)
    • Line 7: warning: exported type JsonBool should have comment or be unexported (golint)
    • apitest/pkg/lib/util/util.go
    • Line 9: warning: exported function Max should have comment or be unexported (golint)
    • Line 16: warning: exported function RemoveFromJsonArray should have comment or be unexported (golint)
    • Line 28: warning: exported function GetStringFromInterface should have comment or be unexported (golint)
    • apitest/pkg/lib/template/util.go
    • Line 33: warning: exported function LoadManifestDataAsObject should have comment or be unexported (golint)
    • Line 67: warning: exported function LoadManifestDataAsRawJson should have comment or be unexported (golint)
    • apitest/http_server.go
    • Line 106: warning: exported type ErrorResponse should have comment or be unexported (golint)
    • Line 126: warning: exported type BounceResponse should have comment or be unexported (golint)
    • apitest/pkg/lib/compare/comparer.go
    • Line 9: warning: exported type CompareResult should have comment or be unexported (golint)
    • Line 14: warning: exported type CompareFailure should have comment or be unexported (golint)
    • Line 27: warning: exported function JsonEqual should have comment or be unexported (golint)
    • apitest/pkg/lib/template/template_loader.go
    • Line 25: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 72: warning: exported type Loader should have comment or be unexported (golint)
    • Line 78: warning: exported function NewLoader should have comment or be unexported (golint)
    • Line 82: warning: exported method Loader.Render should have comment or be unexported (golint)
    • Line 283: warning: don't use underscores in Go names; var grouped_rows should be groupedRows (golint)
    • Line 286: warning: don't use underscores in Go names; var group_key should be groupKey (golint)
    • Line 304: warning: don't use underscores in Go names; var grouped_rows should be groupedRows (golint)
    • Line 308: warning: don't use underscores in Go names; var group_key should be groupKey (golint)
    • Line 327: warning: don't use underscores in Go names; var g_rows should be gRows (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign95%

IneffAssign detects ineffectual assignments in Go code.


misspell97%

Misspell Finds commonly misspelled English words