Preparing report...

Report for github.com/DapperDox/dapperdox

D    Needs lots of improvement    Found 16 issues across 16 files

Tweet

gofmt12%

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!


gocyclo81%

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.

    • dapperdox/spec/spec.go
    • Line 1053: warning: cyclomatic complexity 32 of function (*APISpecification).resourceFromSchema() is high (> 15) (gocyclo)
    • Line 298: warning: cyclomatic complexity 28 of function (*APISpecification).Load() is high (> 15) (gocyclo)
    • Line 626: warning: cyclomatic complexity 25 of function (*APISpecification).processMethod() is high (> 15) (gocyclo)
    • Line 1255: warning: cyclomatic complexity 16 of function (*APISpecification).processProperty() is high (> 15) (gocyclo)

golint6%

Golint is a linter for Go source code.

    • dapperdox/network/network.go
    • Line 1: warning: package comment should be of the form "Package network ..." (golint)
    • Line 28: warning: exported function GetListener should have comment or be unexported (golint)
    • dapperdox/handlers/guides/guides.go
    • Line 1: warning: package comment should be of the form "Package guides ..." (golint)
    • Line 36: warning: comment on exported function Register should be of the form "Register ..." (golint)
    • Line 58: warning: don't use underscores in Go names; var root_node should be rootNode (golint)
    • Line 59: warning: don't use underscores in Go names; var route_base should be routeBase (golint)
    • Line 65: warning: don't use underscores in Go names; var path_base should be pathBase (golint)
    • Line 162: warning: comment on exported function StripBasepathAndExtension should be of the form "StripBasepathAndExtension ..." (golint)
    • Line 171: warning: don't use underscores in Go names; func parameter path_base should be pathBase (golint)
    • dapperdox/navigation/navigation.go
    • Line 1: warning: package comment should be of the form "Package navigation ..." (golint)
    • Line 22: warning: exported type NavigationNode should have comment or be unexported (golint)
    • Line 31: warning: exported type ByOrder should have comment or be unexported (golint)
    • dapperdox/proxy/proxy.go
    • Line 1: warning: package comment should be of the form "Package proxy ..." (golint)
    • Line 43: warning: exported function Register should have comment or be unexported (golint)
    • dapperdox/spec/spec.go
    • Line 1: warning: package comment should be of the form "Package spec ..." (golint)
    • Line 39: warning: exported type APISpecification should have comment or be unexported (golint)
    • Line 51: warning: exported var APISuite should have comment or be unexported (golint)
    • Line 73: warning: exported type APISet should have comment or be unexported (golint)
    • Line 75: warning: exported type Info should have comment or be unexported (golint)
    • Line 95: warning: exported type Version should have comment or be unexported (golint)
    • Line 100: warning: exported type OAuth2Scheme should have comment or be unexported (golint)
    • Line 107: warning: exported type SecurityScheme should have comment or be unexported (golint)
    • Line 118: warning: exported type Security should have comment or be unexported (golint)
    • Line 170: warning: exported type ResourceOrigin should have comment or be unexported (golint)
    • Line 173: warning: exported const RequestBody should have comment (or a comment on this block) or be unexported (golint)
    • Line 195: warning: exported type Header should have comment or be unexported (golint)
    • Line 216: warning: exported type SortMethods should have comment or be unexported (golint)
    • Line 253: warning: exported function LoadSpecifications should have comment or be unexported (golint)
    • Line 296: warning: comment on exported method APISpecification.Load should be of the form "Load ..." (golint)
    • Line 449: warning: should omit 2nd value from range; this loop is equivalent to `for v := range ...` (golint)
    • Line 782: warning: don't use underscores in Go names; var is_array should be isArray (golint)
    • Line 783: warning: don't use underscores in Go names; var example_json should be exampleJSON (golint)
    • Line 872: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 879: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 968: warning: don't use underscores in Go names; var scope_desc should be scopeDesc (golint)
    • Line 981: warning: don't use underscores in Go names; func parameter is_array should be isArray (golint)
    • Line 986: warning: don't use underscores in Go names; var array_obj should be arrayObj (golint)
    • Line 1020: warning: don't use underscores in Go names; var s_orig should be sOrig (golint)
    • Line 1087: warning: don't use underscores in Go names; var original_s should be originalS (golint)
    • Line 1134: warning: don't use underscores in Go names; var is_array should be isArray (golint)
    • Line 1212: warning: don't use underscores in Go names; var json_representation should be jsonRepresentation (golint)
    • Line 1231: warning: don't use underscores in Go names; method parameter json_rep should be jsonRep (golint)
    • Line 1255: warning: don't use underscores in Go names; method parameter json_rep should be jsonRep (golint)
    • Line 1259: warning: don't use underscores in Go names; var json_resource should be jsonResource (golint)
    • Line 1304: warning: don't use underscores in Go names; var array_obj should be arrayObj (golint)
    • Line 1308: warning: don't use underscores in Go names; var array_obj should be arrayObj (golint)
    • Line 1326: warning: don't use underscores in Go names; var array_obj should be arrayObj (golint)
    • Line 1331: warning: don't use underscores in Go names; var array_obj should be arrayObj (golint)
    • Line 1372: warning: exported function TitleToKebab should have comment or be unexported (golint)
    • Line 1381: warning: exported function CamelToKebab should have comment or be unexported (golint)
    • Line 1413: warning: comment on exported function JSONMarshalIndent should be of the form "JSONMarshalIndent ..." (golint)
    • Line 1439: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • dapperdox/render/asset/asset.go
    • Line 1: warning: package comment should be of the form "Package asset ..." (golint)
    • Line 50: warning: comment on exported function Asset should be of the form "Asset ..." (golint)
    • Line 59: warning: comment on exported function AssetNames should be of the form "AssetNames ..." (golint)
    • Line 68: warning: comment on exported function MetaData should be of the form "MetaData ..." (golint)
    • Line 78: warning: comment on exported function MetaDataFileList should be of the form "MetaDataFileList ..." (golint)
    • Line 89: warning: comment on exported function Compile should be of the form "Compile ..." (golint)
    • Line 216: warning: comment on exported function ProcessMarkdown should be of the form "ProcessMarkdown ..." (golint)
    • Line 228: warning: comment on exported function ProcessMetadata should be of the form "ProcessMetadata ..." (golint)
    • Line 301: warning: exported function CompileGFMMap should have comment or be unexported (golint)
    • dapperdox/handlers/reference/reference.go
    • Line 1: warning: package comment should be of the form "Package reference ..." (golint)
    • Line 46: warning: don't use underscores in Go names; var spec_id should be specID (golint)
    • Line 161: warning: comment on exported function APIHandler should be of the form "APIHandler ..." (golint)
    • Line 185: warning: comment on exported function MethodHandler should be of the form "MethodHandler ..." (golint)
    • Line 215: warning: comment on exported function GlobalResourceHandler should be of the form "GlobalResourceHandler ..." (golint)
    • dapperdox/render/render.go
    • Line 1: warning: package comment should be of the form "Package render ..." (golint)
    • Line 40: warning: comment on exported type GuideType should be of the form "GuideType ..." (with optional leading article) (golint)
    • Line 53: warning: exported function Register should have comment or be unexported (golint)
    • Line 57: warning: comment on exported function New should be of the form "New ..." (golint)
    • Line 136: warning: comment on exported type HTMLWriter should be of the form "HTMLWriter ..." (with optional leading article) (golint)
    • Line 141: warning: exported method HTMLWriter.Header should have comment or be unexported (golint)
    • Line 142: warning: exported method HTMLWriter.WriteHeader should have comment or be unexported (golint)
    • Line 144: warning: exported method HTMLWriter.Flush should have comment or be unexported (golint)
    • Line 223: warning: comment on exported function HTML should be of the form "HTML ..." (golint)
    • Line 229: warning: comment on exported function TemplateLookup should be of the form "TemplateLookup ..." (golint)
    • Line 234: warning: comment on exported function DefaultVars should be of the form "DefaultVars ..." (golint)
    • Line 273: warning: comment on exported function SetGuidesNavigation should be of the form "SetGuidesNavigation ..." (golint)
    • dapperdox/spec/statuscodes.go
    • Line 1: warning: package comment should be of the form "Package spec ..." (golint)
    • Line 30: warning: exported var StatusCodes should have comment or be unexported (golint)
    • Line 32: warning: exported function LoadStatusCodes should have comment or be unexported (golint)
    • Line 106: warning: exported function HTTPStatusDescription should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign18%

IneffAssign detects ineffectual assignments in Go code.

    • dapperdox/config/config.go
    • Line 24: warning: cannot find package "." in: (ineffassign)
    • Line 25: warning: cannot find package "." in: (ineffassign)
    • Line 24: warning: could not import github.com/dapperdox/dapperdox/logger (invalid package name: "") (ineffassign)
    • Line 25: warning: could not import github.com/ian-kent/gofigure (invalid package name: "") (ineffassign)
    • dapperdox/spec/spec.go
    • Line 30: warning: cannot find package "." in: (ineffassign)
    • Line 31: warning: cannot find package "." in: (ineffassign)
    • Line 33: warning: cannot find package "." in: (ineffassign)
    • Line 34: warning: cannot find package "." in: (ineffassign)
    • Line 35: warning: cannot find package "." in: (ineffassign)
    • Line 36: warning: cannot find package "." in: (ineffassign)
    • Line 30: warning: could not import github.com/dapperdox/dapperdox/config (invalid package name: "") (ineffassign)
    • Line 31: warning: could not import github.com/dapperdox/dapperdox/logger (invalid package name: "") (ineffassign)
    • Line 33: warning: could not import github.com/go-openapi/loads (invalid package name: "") (ineffassign)
    • Line 34: warning: could not import github.com/go-openapi/spec (invalid package name: "") (ineffassign)
    • Line 35: warning: could not import github.com/serenize/snaker (invalid package name: "") (ineffassign)
    • Line 36: warning: could not import github.com/shurcooL/github_flavored_markdown (invalid package name: "") (ineffassign)
    • dapperdox/network/network.go
    • Line 23: warning: cannot find package "." in: (ineffassign)
    • Line 24: warning: cannot find package "." in: (ineffassign)
    • Line 23: warning: could not import github.com/dapperdox/dapperdox/config (invalid package name: "") (ineffassign)
    • Line 24: warning: could not import github.com/dapperdox/dapperdox/logger (invalid package name: "") (ineffassign)
    • dapperdox/handlers/guides/guides.go
    • Line 28: warning: cannot find package "." in: (ineffassign)
    • Line 29: warning: cannot find package "." in: (ineffassign)
    • Line 30: warning: cannot find package "." in: (ineffassign)
    • Line 31: warning: cannot find package "." in: (ineffassign)
    • Line 32: warning: cannot find package "." in: (ineffassign)
    • Line 33: warning: cannot find package "." in: (ineffassign)
    • Line 28: warning: could not import github.com/dapperdox/dapperdox/logger (invalid package name: "") (ineffassign)
    • Line 29: warning: could not import github.com/dapperdox/dapperdox/navigation (invalid package name: "") (ineffassign)
    • Line 30: warning: could not import github.com/dapperdox/dapperdox/render (invalid package name: "") (ineffassign)
    • Line 31: warning: could not import github.com/dapperdox/dapperdox/render/asset (invalid package name: "") (ineffassign)
    • Line 32: warning: could not import github.com/dapperdox/dapperdox/spec (invalid package name: "") (ineffassign)
    • Line 33: warning: could not import github.com/gorilla/pat (invalid package name: "") (ineffassign)
    • dapperdox/proxy/proxy.go
    • Line 21: warning: cannot find package "." in: (ineffassign)
    • Line 22: warning: cannot find package "." in: (ineffassign)
    • Line 23: warning: cannot find package "." in: (ineffassign)
    • Line 21: warning: could not import github.com/dapperdox/dapperdox/config (invalid package name: "") (ineffassign)
    • Line 22: warning: could not import github.com/dapperdox/dapperdox/logger (invalid package name: "") (ineffassign)
    • Line 23: warning: could not import github.com/gorilla/pat (invalid package name: "") (ineffassign)
    • dapperdox/main.go
    • Line 28: warning: cannot find package "." in: (ineffassign)
    • Line 29: warning: cannot find package "." in: (ineffassign)
    • Line 30: warning: cannot find package "." in: (ineffassign)
    • Line 31: warning: cannot find package "." in: (ineffassign)
    • Line 32: warning: cannot find package "." in: (ineffassign)
    • Line 33: warning: cannot find package "." in: (ineffassign)
    • Line 34: warning: cannot find package "." in: (ineffassign)
    • Line 35: warning: cannot find package "." in: (ineffassign)
    • Line 36: warning: cannot find package "." in: (ineffassign)
    • Line 37: warning: cannot find package "." in: (ineffassign)
    • Line 38: warning: cannot find package "." in: (ineffassign)
    • Line 39: warning: cannot find package "." in: (ineffassign)
    • Line 40: warning: cannot find package "." in: (ineffassign)
    • Line 41: warning: cannot find package "." in: (ineffassign)
    • Line 42: warning: cannot find package "." in: (ineffassign)
    • Line 28: warning: could not import github.com/dapperdox/dapperdox/config (invalid package name: "") (ineffassign)
    • Line 29: warning: could not import github.com/dapperdox/dapperdox/handlers/guides (invalid package name: "") (ineffassign)
    • Line 30: warning: could not import github.com/dapperdox/dapperdox/handlers/home (invalid package name: "") (ineffassign)
    • Line 31: warning: could not import github.com/dapperdox/dapperdox/handlers/reference (invalid package name: "") (ineffassign)
    • Line 32: warning: could not import github.com/dapperdox/dapperdox/handlers/specs (invalid package name: "") (ineffassign)
    • Line 33: warning: could not import github.com/dapperdox/dapperdox/handlers/static (invalid package name: "") (ineffassign)
    • Line 34: warning: could not import github.com/dapperdox/dapperdox/handlers/timeout (invalid package name: "") (ineffassign)
    • Line 35: warning: could not import github.com/dapperdox/dapperdox/logger (invalid package name: "") (ineffassign)
    • Line 36: warning: could not import github.com/dapperdox/dapperdox/network (invalid package name: "") (ineffassign)
    • Line 37: warning: could not import github.com/dapperdox/dapperdox/proxy (invalid package name: "") (ineffassign)
    • Line 38: warning: could not import github.com/dapperdox/dapperdox/render (invalid package name: "") (ineffassign)
    • Line 39: warning: could not import github.com/dapperdox/dapperdox/spec (invalid package name: "") (ineffassign)
    • Line 40: warning: could not import github.com/gorilla/pat (invalid package name: "") (ineffassign)
    • Line 41: warning: could not import github.com/justinas/alice (invalid package name: "") (ineffassign)
    • Line 42: warning: could not import github.com/justinas/nosurf (invalid package name: "") (ineffassign)
    • dapperdox/render/asset/asset.go
    • Line 32: warning: cannot find package "." in: (ineffassign)
    • Line 33: warning: cannot find package "." in: (ineffassign)
    • Line 34: warning: cannot find package "." in: (ineffassign)
    • Line 32: warning: could not import github.com/dapperdox/dapperdox/config (invalid package name: "") (ineffassign)
    • Line 33: warning: could not import github.com/dapperdox/dapperdox/logger (invalid package name: "") (ineffassign)
    • Line 34: warning: could not import github.com/shurcooL/github_flavored_markdown (invalid package name: "") (ineffassign)
    • dapperdox/handlers/specs/specs.go
    • Line 27: warning: cannot find package "." in: (ineffassign)
    • Line 28: warning: cannot find package "." in: (ineffassign)
    • Line 29: warning: cannot find package "." in: (ineffassign)
    • Line 27: warning: could not import github.com/dapperdox/dapperdox/config (invalid package name: "") (ineffassign)
    • Line 28: warning: could not import github.com/dapperdox/dapperdox/logger (invalid package name: "") (ineffassign)
    • Line 29: warning: could not import github.com/gorilla/pat (invalid package name: "") (ineffassign)
    • dapperdox/handlers/home/home.go
    • Line 23: warning: cannot find package "." in: (ineffassign)
    • Line 24: warning: cannot find package "." in: (ineffassign)
    • Line 25: warning: cannot find package "." in: (ineffassign)
    • Line 26: warning: cannot find package "." in: (ineffassign)
    • Line 27: warning: cannot find package "." in: (ineffassign)
    • Line 23: warning: could not import github.com/dapperdox/dapperdox/config (invalid package name: "") (ineffassign)
    • Line 24: warning: could not import github.com/dapperdox/dapperdox/logger (invalid package name: "") (ineffassign)
    • Line 25: warning: could not import github.com/dapperdox/dapperdox/render (invalid package name: "") (ineffassign)
    • Line 26: warning: could not import github.com/dapperdox/dapperdox/spec (invalid package name: "") (ineffassign)
    • Line 27: warning: could not import github.com/gorilla/pat (invalid package name: "") (ineffassign)
    • dapperdox/handlers/static/static.go
    • Line 27: warning: cannot find package "." in: (ineffassign)
    • Line 28: warning: cannot find package "." in: (ineffassign)
    • Line 29: warning: cannot find package "." in: (ineffassign)
    • Line 30: warning: cannot find package "." in: (ineffassign)
    • Line 27: warning: could not import github.com/dapperdox/dapperdox/logger (invalid package name: "") (ineffassign)
    • Line 28: warning: could not import github.com/dapperdox/dapperdox/render (invalid package name: "") (ineffassign)
    • Line 29: warning: could not import github.com/dapperdox/dapperdox/render/asset (invalid package name: "") (ineffassign)
    • Line 30: warning: could not import github.com/gorilla/pat (invalid package name: "") (ineffassign)
    • dapperdox/render/render.go
    • Line 28: warning: cannot find package "." in: (ineffassign)
    • Line 29: warning: cannot find package "." in: (ineffassign)
    • Line 30: warning: cannot find package "." in: (ineffassign)
    • Line 31: warning: cannot find package "." in: (ineffassign)
    • Line 32: warning: cannot find package "." in: (ineffassign)
    • Line 33: warning: cannot find package "." in: (ineffassign)
    • Line 34: warning: cannot find package "." in: (ineffassign)
    • Line 28: warning: could not import github.com/dapperdox/dapperdox/config (invalid package name: "") (ineffassign)
    • Line 29: warning: could not import github.com/dapperdox/dapperdox/logger (invalid package name: "") (ineffassign)
    • Line 30: warning: could not import github.com/dapperdox/dapperdox/navigation (invalid package name: "") (ineffassign)
    • Line 31: warning: could not import github.com/dapperdox/dapperdox/render/asset (invalid package name: "") (ineffassign)
    • Line 32: warning: could not import github.com/dapperdox/dapperdox/spec (invalid package name: "") (ineffassign)
    • Line 33: warning: could not import github.com/ian-kent/htmlform (invalid package name: "") (ineffassign)
    • Line 34: warning: could not import github.com/unrolled/render (invalid package name: "") (ineffassign)
    • dapperdox/handlers/reference/reference.go
    • Line 24: warning: cannot find package "." in: (ineffassign)
    • Line 25: warning: cannot find package "." in: (ineffassign)
    • Line 26: warning: cannot find package "." in: (ineffassign)
    • Line 27: warning: cannot find package "." in: (ineffassign)
    • Line 24: warning: could not import github.com/dapperdox/dapperdox/logger (invalid package name: "") (ineffassign)
    • Line 25: warning: could not import github.com/dapperdox/dapperdox/render (invalid package name: "") (ineffassign)
    • Line 26: warning: could not import github.com/dapperdox/dapperdox/spec (invalid package name: "") (ineffassign)
    • Line 27: warning: could not import github.com/gorilla/pat (invalid package name: "") (ineffassign)

misspell81%

Misspell Finds commonly misspelled English words