Preparing report...

Report for github.com/toowoxx/caddy2-html-injection-plugin

D    Needs lots of improvement    Found 2 issues across 2 files

Tweet

gofmt0%

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!


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!


golint0%

Golint is a linter for Go source code.

    • caddy2-html-injection-plugin/injection.go
    • Line 26: warning: exported type Middleware should have comment or be unexported (golint)
    • Line 63: warning: exported type ContentTypeStatus should have comment or be unexported (golint)
    • Line 71: warning: exported type LineHandler should have comment or be unexported (golint)
    • Line 75: warning: exported type InjectedWriter should have comment or be unexported (golint)
    • Line 88: warning: exported method InjectedWriter.Header should have comment or be unexported (golint)
    • Line 151: warning: exported method InjectedWriter.HandleLine should have comment or be unexported (golint)
    • Line 171: warning: exported method InjectedWriter.HandleCSP should have comment or be unexported (golint)
    • Line 228: warning: exported method InjectedWriter.HandleCSPForText should have comment or be unexported (golint)
    • Line 332: warning: exported method InjectedWriter.Flush should have comment or be unexported (golint)
    • Line 349: warning: exported method InjectedWriter.WriteHeader should have comment or be unexported (golint)
    • Line 361: warning: exported function CreateInjectedWriter should have comment or be unexported (golint)
    • Line 377: warning: exported method Middleware.IsWebSocket should have comment or be unexported (golint)
    • Line 406: warning: exported method Middleware.ShouldBypassForRequest should have comment or be unexported (golint)
    • Line 414: warning: exported method Middleware.ShouldBypassForResponse should have comment or be unexported (golint)
    • caddy2-html-injection-plugin/rand.go
    • Line 9: warning: exported function GenerateRandomBytes should have comment or be unexported (golint)
    • Line 19: warning: exported function GenerateRandomStringURLSafe should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign50%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!