Preparing report...

Report for github.com/go-swagger/go-swagger

(v0.30.5)

A+    Excellent!    Found 42 issues across 244 files

Tweet

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!


gofmt100%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


gocyclo83%

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.

    • generator/operation.go
    • Line 303: warning: cyclomatic complexity 38 of function (*codeGenOpBuilder).MakeOperation() is high (> 15) (gocyclo)
    • Line 822: warning: cyclomatic complexity 31 of function (*codeGenOpBuilder).MakeBodyParameterItemsAndMaps() is high (> 15) (gocyclo)
    • Line 925: warning: cyclomatic complexity 26 of function (*codeGenOpBuilder).setBodyParamValidation() is high (> 15) (gocyclo)
    • codescan/parser.go
    • Line 1369: warning: cyclomatic complexity 26 of function (*setOpResponses).Parse() is high (> 15) (gocyclo)
    • Line 579: warning: cyclomatic complexity 24 of function (*sectionedParser).Parse() is high (> 15) (gocyclo)
    • Line 1530: warning: cyclomatic complexity 23 of function buildExtensionObjects() is high (> 15) (gocyclo)
    • Line 210: warning: cyclomatic complexity 21 of function swaggerSchemaForType() is high (> 15) (gocyclo)
    • scan/parameters.go
    • Line 313: warning: cyclomatic complexity 42 of function (*paramStructParser).parseStructType() is high (> 15) (gocyclo)
    • hack/codegen_nonreg_test.go
    • Line 384: warning: cyclomatic complexity 23 of function TestCodegen() is high (> 15) (gocyclo)
    • Line 273: warning: cyclomatic complexity 18 of function buildRuns() is high (> 15) (gocyclo)
    • codescan/parameters.go
    • Line 296: warning: cyclomatic complexity 44 of function (*parameterBuilder).buildFromStruct() is high (> 15) (gocyclo)
    • Line 220: warning: cyclomatic complexity 17 of function (*parameterBuilder).buildFromField() is high (> 15) (gocyclo)
    • scan/route_params.go
    • Line 80: warning: cyclomatic complexity 21 of function (*setOpParams).Parse() is high (> 15) (gocyclo)
    • Line 164: warning: cyclomatic complexity 17 of function processSchema() is high (> 15) (gocyclo)
    • generator/types.go
    • Line 805: warning: cyclomatic complexity 29 of function (*typeResolver).ResolveSchema() is high (> 15) (gocyclo)
    • Line 536: warning: cyclomatic complexity 28 of function (*typeResolver).resolveObject() is high (> 15) (gocyclo)
    • Line 689: warning: cyclomatic complexity 25 of function nullableNumber() is high (> 15) (gocyclo)
    • codescan/route_params.go
    • Line 77: warning: cyclomatic complexity 21 of function (*setOpParams).Parse() is high (> 15) (gocyclo)
    • Line 174: warning: cyclomatic complexity 17 of function processSchema() is high (> 15) (gocyclo)
    • generator/pointer_test.go
    • Line 427: warning: cyclomatic complexity 16 of function testPointToSliceElements() is high (> 15) (gocyclo)
    • Line 473: warning: cyclomatic complexity 16 of function testPointToPrimitives() is high (> 15) (gocyclo)
    • Line 382: warning: cyclomatic complexity 16 of function testPointToAdditionalPropertiesElements() is high (> 15) (gocyclo)
    • generator/model.go
    • Line 1936: warning: cyclomatic complexity 61 of function (*schemaGenContext).makeGenSchema() is high (> 15) (gocyclo)
    • Line 746: warning: cyclomatic complexity 52 of function (*schemaGenContext).buildProperties() is high (> 15) (gocyclo)
    • Line 167: warning: cyclomatic complexity 45 of function shallowValidationLookup() is high (> 15) (gocyclo)
    • Line 1229: warning: cyclomatic complexity 35 of function (*schemaGenContext).buildAdditionalProperties() is high (> 15) (gocyclo)
    • Line 1083: warning: cyclomatic complexity 33 of function (*mapStack).Build() is high (> 15) (gocyclo)
    • Line 925: warning: cyclomatic complexity 31 of function (*schemaGenContext).buildAllOf() is high (> 15) (gocyclo)
    • Line 229: warning: cyclomatic complexity 25 of function makeGenDefinitionHierarchy() is high (> 15) (gocyclo)
    • Line 378: warning: cyclomatic complexity 24 of function findImports() is high (> 15) (gocyclo)
    • Line 1897: warning: cyclomatic complexity 19 of function (*schemaGenContext).buildMapOfNullable() is high (> 15) (gocyclo)
    • Line 1434: warning: cyclomatic complexity 18 of function (*schemaGenContext).buildArray() is high (> 15) (gocyclo)
    • Line 1515: warning: cyclomatic complexity 18 of function (*schemaGenContext).buildItems() is high (> 15) (gocyclo)
    • generator/response_test.go
    • Line 213: warning: cyclomatic complexity 20 of function (*respHeaderTestContext).Assert() is high (> 15) (gocyclo)
    • Line 146: warning: cyclomatic complexity 16 of function (*responseTestContext).Assert() is high (> 15) (gocyclo)
    • scan/scanner.go
    • Line 877: warning: cyclomatic complexity 24 of function (*sectionedParser).Parse() is high (> 15) (gocyclo)
    • Line 482: warning: cyclomatic complexity 20 of function swaggerSchemaForType() is high (> 15) (gocyclo)
    • Line 317: warning: cyclomatic complexity 17 of function (*appScanner).Parse() is high (> 15) (gocyclo)
    • codescan/schema.go
    • Line 291: warning: cyclomatic complexity 53 of function (*schemaBuilder).buildFromType() is high (> 15) (gocyclo)
    • Line 666: warning: cyclomatic complexity 46 of function (*schemaBuilder).buildFromStruct() is high (> 15) (gocyclo)
    • Line 473: warning: cyclomatic complexity 45 of function (*schemaBuilder).buildFromInterface() is high (> 15) (gocyclo)
    • Line 166: warning: cyclomatic complexity 22 of function (*schemaBuilder).buildFromDecl() is high (> 15) (gocyclo)
    • Line 960: warning: cyclomatic complexity 16 of function (*schemaBuilder).createParser() is high (> 15) (gocyclo)
    • scan/schema.go
    • Line 608: warning: cyclomatic complexity 39 of function (*schemaParser).parseStructType() is high (> 15) (gocyclo)
    • Line 495: warning: cyclomatic complexity 32 of function (*schemaParser).parseInterfaceType() is high (> 15) (gocyclo)
    • Line 200: warning: cyclomatic complexity 30 of function (*schemaParser).parseDecl() is high (> 15) (gocyclo)
    • Line 1000: warning: cyclomatic complexity 27 of function (*schemaParser).parseIdentProperty() is high (> 15) (gocyclo)
    • Line 1243: warning: cyclomatic complexity 22 of function parseProperty() is high (> 15) (gocyclo)
    • Line 320: warning: cyclomatic complexity 22 of function (*schemaParser).parseNamedType() is high (> 15) (gocyclo)
    • codescan/responses.go
    • Line 266: warning: cyclomatic complexity 38 of function (*responseBuilder).buildFromStruct() is high (> 15) (gocyclo)
    • Line 155: warning: cyclomatic complexity 17 of function (*responseBuilder).buildFromField() is high (> 15) (gocyclo)
    • scan/responses.go
    • Line 295: warning: cyclomatic complexity 35 of function (*responseParser).parseStructType() is high (> 15) (gocyclo)
    • scan/classifier.go
    • Line 80: warning: cyclomatic complexity 33 of function (*programClassifier).Classify() is high (> 15) (gocyclo)
    • generator/parameter_test.go
    • Line 268: warning: cyclomatic complexity 31 of function (*paramTestContext).assertGenParam() is high (> 15) (gocyclo)
    • Line 370: warning: cyclomatic complexity 21 of function (*paramItemsTestContext).Assert() is high (> 15) (gocyclo)
    • scan/path.go
    • Line 65: warning: cyclomatic complexity 23 of function setPathOperation() is high (> 15) (gocyclo)
    • codescan/application.go
    • Line 610: warning: cyclomatic complexity 22 of function (*typeIndex).detectNodes() is high (> 15) (gocyclo)
    • Line 475: warning: cyclomatic complexity 21 of function (*typeIndex).processPackage() is high (> 15) (gocyclo)
    • Line 362: warning: cyclomatic complexity 18 of function (*scanCtx).FindEnumValues() is high (> 15) (gocyclo)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell99%

Misspell Finds commonly misspelled English words