Preparing report...

Report for github.com/rekby/lets-proxy

A    Great!    Found 14 issues across 19 files

Tweet

gofmt94%

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!


golint52%

Golint is a linter for Go source code.

    • lets-proxy/main.go
    • Line 42: warning: exported const LETSENCRYPT_CREATE_CERTIFICATE_TIMEOUT should have comment (or a comment on this block) or be unexported (golint)
    • Line 57: warning: exported const PROXYMODE_HTTP should have comment (or a comment on this block) or be unexported (golint)
    • Line 78: warning: exported type ConnectionID should have comment or be unexported (golint)
    • Line 88: warning: exported function HasPrefixFold should have comment or be unexported (golint)
    • Line 465: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 1123: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • lets-proxy/platform_nix.go
    • Line 19: warning: exported type User should have comment or be unexported (golint)
    • Line 100: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 176: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • lets-proxy/proxy.go
    • Line 16: warning: exported const NETBUF_SIZE should have comment (or a comment on this block) or be unexported (golint)
    • Line 19: warning: comment on exported type KeepAliveModeType should be of the form "KeepAliveModeType ..." (with optional leading article) (golint)
    • Line 23: warning: exported const KEEPALIVE_TRANSPARENT should have comment (or a comment on this block) or be unexported (golint)
    • Line 28: warning: exported const KEEPALIVE_TRANSPARENT_STRING should have comment (or a comment on this block) or be unexported (golint)
    • Line 91: warning: exported const PROXY_KEEPALIVE_NOTHING should have comment (or a comment on this block) or be unexported (golint)
    • Line 438: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • lets-proxy/acme-client-pool.go
    • Line 16: warning: exported const ACMECLIENT_ACCEPT_RULES_INTERVAL should have comment (or a comment on this block) or be unexported (golint)
    • Line 27: warning: exported function NewAcmeClientPool should have comment or be unexported (golint)
    • lets-proxy/acme.go
    • Line 28: warning: exported const SNI01_EXPIRE_TOKEN should have comment (or a comment on this block) or be unexported (golint)
    • Line 35: warning: exported var CHALLENGE_ORDER should have comment or be unexported (golint)
    • Line 50: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 59: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 67: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 76: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 113: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 125: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 130: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 285: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 285: warning: don't use underscores in Go names; method parameter main_domain should be mainDomain (golint)
    • Line 293: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 316: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 316: warning: don't use underscores in Go names; method parameter main_domain should be mainDomain (golint)
    • Line 338: warning: don't use underscores in Go names; var auth_err should be authErr (golint)
    • Line 479: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 516: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • Line 529: warning: receiver name should be a reflection of its identity; don't use generic names such as "this" or "self" (golint)
    • lets-proxy/cache.go
    • Line 22: warning: exported var DEFAULT_FILE_MODE should have comment or be unexported (golint)
    • Line 40: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 78: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • lets-proxy/helpers.go
    • Line 7: warning: exported type DomainPresent should have comment or be unexported (golint)
    • Line 17: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • lets-proxy/http-validation.go
    • Line 14: warning: exported const Http01ValidationPrefix should have comment (or a comment on this block) or be unexported (golint)
    • Line 23: warning: exported type HttpValidationHandler should have comment or be unexported (golint)
    • Line 51: warning: exported function CanHttpValidation should have comment or be unexported (golint)
    • Line 55: warning: exported function Http01TokenDelete should have comment or be unexported (golint)
    • Line 62: warning: exported function Http01TokenGet should have comment or be unexported (golint)
    • Line 74: warning: exported function Http01TokenPut should have comment or be unexported (golint)

gocyclo63%

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.

    • lets-proxy/main.go
    • Line 396: warning: cyclomatic complexity 63 of function certificateGet() is high (> 15) (gocyclo)
    • Line 92: warning: cyclomatic complexity 62 of function main() is high (> 15) (gocyclo)
    • Line 780: warning: cyclomatic complexity 50 of function prepare() is high (> 15) (gocyclo)
    • lets-proxy/proxy.go
    • Line 107: warning: cyclomatic complexity 53 of function proxyHTTPHeaders() is high (> 15) (gocyclo)
    • Line 334: warning: cyclomatic complexity 26 of function proxyHTTPBody() is high (> 15) (gocyclo)
    • Line 469: warning: cyclomatic complexity 19 of function startProxyHTTP() is high (> 15) (gocyclo)
    • lets-proxy/acme.go
    • Line 130: warning: cyclomatic complexity 30 of function (*acmeStruct).authorizeDomain() is high (> 15) (gocyclo)
    • Line 316: warning: cyclomatic complexity 25 of function (*acmeStruct).createCertificateAcme() is high (> 15) (gocyclo)

ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell68%

Misspell Finds commonly misspelled English words

    • lets-proxy/main.go
    • Line 64: warning: "becouse" is a misspelling of "because" (misspell)
    • Line 116: warning: "becouse" is a misspelling of "because" (misspell)
    • Line 520: warning: "becouse" is a misspelling of "because" (misspell)
    • Line 1023: warning: "becouse" is a misspelling of "because" (misspell)