Preparing report...

Report for github.com/clearcodehq/openapi-linter

C    Needs some work    Found 9 issues across 10 files

Tweet

gofmt30%

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!


gocyclo90%

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.


golint60%

Golint is a linter for Go source code.

    • openapi-linter/version/version.go
    • Line 8: warning: comment on exported var GitCommit should be of the form "GitCommit ..." (golint)
    • Line 11: warning: comment on exported const Version should be of the form "Version ..." (golint)
    • Line 14: warning: exported var BuildDate should have comment or be unexported (golint)
    • Line 16: warning: exported var GoVersion should have comment or be unexported (golint)
    • Line 18: warning: exported var OsArch should have comment or be unexported (golint)
    • openapi-linter/validate/validate.go
    • Line 15: warning: comment on exported type ValidationError should be of the form "ValidationError ..." (with optional leading article) (golint)
    • Line 22: warning: comment on exported function TraverseJSONObject should be of the form "TraverseJSONObject ..." (golint)
    • Line 48: warning: comment on exported type JsonFileInfo should be of the form "JsonFileInfo ..." (with optional leading article) (golint)
    • Line 54: warning: comment on exported function IsJsonFile should be of the form "IsJsonFile ..." (golint)
    • Line 67: warning: comment on exported function FindJsonFiles should be of the form "FindJsonFiles ..." (golint)
    • Line 79: warning: comment on exported function ValidateAllSchemasInDir should be of the form "ValidateAllSchemasInDir ..." (golint)
    • Line 96: warning: comment on exported function ValidateJSONFile should be of the form "ValidateJSONFile ..." (golint)
    • Line 122: warning: comment on exported function ValidateSchema should be of the form "ValidateSchema ..." (golint)
    • openapi-linter/validate-examples/validate_examples.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 19: warning: exported type Example should have comment or be unexported (golint)
    • Line 26: warning: comment on exported function FindExamples should be of the form "FindExamples ..." (golint)
    • Line 81: warning: comment on exported function GetObjectFromFile should be of the form "GetObjectFromFile ..." (golint)
    • Line 97: warning: comment on exported function ScanJSONFiles should be of the form "ScanJSONFiles ..." (golint)
    • Line 112: warning: exported function ScanForExamples should have comment or be unexported (golint)
    • Line 190: warning: comment on exported function GetReferenceLoader should be of the form "GetReferenceLoader ..." (golint)
    • Line 249: warning: comment on exported function TranslateReferenceToJSONPath should be of the form "TranslateReferenceToJSONPath ..." (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign80%

IneffAssign detects ineffectual assignments in Go code.

    • openapi-linter/validate-examples/validate_examples_test.go
    • Line 281: warning: loader.LoadJSON undefined (type *gojsonschema.JSONLoader has no field or method LoadJSON) (ineffassign)
    • Line 284: warning: cannot use loader (variable of type *gojsonschema.JSONLoader) as gojsonschema.JSONLoader value in return statement: missing method JsonReference (ineffassign)
    • Line 310: warning: undeclared name: RemovePartialLoader (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!