Preparing report...

Report for github.com/Khan/genqlient

A+    Excellent!    Found 5 issues across 31 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!


gocyclo100%

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.

No problems detected. Good job!


golint83%

Golint is a linter for Go source code.

    • genqlient/internal/testutil/types.go
    • Line 9: warning: exported type ID should have comment or be unexported (golint)
    • Line 11: warning: exported type Pokemon should have comment or be unexported (golint)
    • Line 16: warning: exported method Pokemon.Battle should have comment or be unexported (golint)
    • Line 20: warning: exported type MyContext should have comment or be unexported (golint)
    • Line 26: warning: exported function GetClientFromNowhere should have comment or be unexported (golint)
    • Line 27: warning: exported function GetClientFromContext should have comment or be unexported (golint)
    • Line 28: warning: exported function GetClientFromMyContext should have comment or be unexported (golint)
    • genqlient/generate/errors.go
    • Line 26: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 53: warning: if block ends with a return statement, so drop this else and outdent its block (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign93%

IneffAssign detects ineffectual assignments in Go code.

    • genqlient/internal/integration/server/server.go
    • Line 15: warning: undeclared name: User (ineffassign)
    • Line 18: warning: undeclared name: Hair (ineffassign)
    • Line 23: warning: undeclared name: Animal (ineffassign)
    • Line 25: warning: undeclared name: SpeciesDog (ineffassign)
    • Line 34: warning: undeclared name: User (ineffassign)
    • Line 26: warning: undeclared name: BeingsHair (ineffassign)
    • Line 29: warning: undeclared name: SpeciesCoelacanth (ineffassign)
    • Line 30: warning: undeclared name: BeingsHair (ineffassign)
    • Line 43: warning: undeclared name: Being (ineffassign)
    • Line 57: warning: undeclared name: User (ineffassign)
    • Line 61: warning: undeclared name: User (ineffassign)
    • Line 65: warning: undeclared name: Being (ineffassign)
    • Line 69: warning: undeclared name: Being (ineffassign)
    • Line 77: warning: undeclared name: Lucky (ineffassign)
    • Line 102: warning: undeclared name: QueryResolver (ineffassign)
    • Line 70: warning: undeclared name: Being (ineffassign)
    • Line 71: warning: i declared but not used (ineffassign)
    • Line 92: warning: undeclared name: NewExecutableSchema (ineffassign)
    • Line 92: warning: undeclared name: Config (ineffassign)
    • Line 15: warning: undeclared name: User (ineffassign)
    • Line 18: warning: undeclared name: Hair (ineffassign)
    • Line 23: warning: undeclared name: Animal (ineffassign)
    • Line 25: warning: undeclared name: SpeciesDog (ineffassign)
    • Line 34: warning: undeclared name: User (ineffassign)
    • Line 26: warning: undeclared name: BeingsHair (ineffassign)
    • Line 29: warning: undeclared name: SpeciesCoelacanth (ineffassign)
    • Line 30: warning: undeclared name: BeingsHair (ineffassign)
    • Line 43: warning: undeclared name: Being (ineffassign)
    • Line 57: warning: undeclared name: User (ineffassign)
    • Line 61: warning: undeclared name: User (ineffassign)
    • Line 65: warning: undeclared name: Being (ineffassign)
    • Line 69: warning: undeclared name: Being (ineffassign)
    • Line 77: warning: undeclared name: Lucky (ineffassign)
    • Line 102: warning: undeclared name: QueryResolver (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!