Preparing report...

Report for github.com/jsiebens/brink

(v0.0.0-20220110161529-ff9ecb3cef94)

A+    Excellent!    Found 20 issues across 27 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!


golint25%

Golint is a linter for Go source code.

    • internal/config/config.go
    • Line 9: warning: exported function LoadConfig should have comment or be unexported (golint)
    • Line 47: warning: exported type Config should have comment or be unexported (golint)
    • Line 58: warning: exported type Tls should have comment or be unexported (golint)
    • Line 63: warning: exported type Oidc should have comment or be unexported (golint)
    • Line 70: warning: exported type Policy should have comment or be unexported (golint)
    • Line 77: warning: exported type Cache should have comment or be unexported (golint)
    • internal/api/api.go
    • Line 5: warning: exported type AuthenticationRequest should have comment or be unexported (golint)
    • Line 10: warning: exported type AuthenticationResponse should have comment or be unexported (golint)
    • Line 16: warning: exported type CreateSessionRequest should have comment or be unexported (golint)
    • Line 20: warning: exported type RegisterSessionRequest should have comment or be unexported (golint)
    • Line 28: warning: exported type Policy should have comment or be unexported (golint)
    • Line 34: warning: exported type SessionResponse should have comment or be unexported (golint)
    • Line 38: warning: exported type MessageResponse should have comment or be unexported (golint)
    • Line 42: warning: exported type KeyResponse should have comment or be unexported (golint)
    • Line 46: warning: exported type AuthToken should have comment or be unexported (golint)
    • Line 54: warning: exported type SessionToken should have comment or be unexported (golint)
    • internal/auth/templates/templates.go
    • Line 13: warning: exported function NewTemplates should have comment or be unexported (golint)
    • Line 17: warning: exported type Template should have comment or be unexported (golint)
    • Line 21: warning: exported method Template.Render should have comment or be unexported (golint)
    • internal/auth/providers/oidc.go
    • Line 15: warning: exported type OIDCProvider should have comment or be unexported (golint)
    • Line 23: warning: exported function NewOIDCProvider should have comment or be unexported (golint)
    • Line 40: warning: exported method OIDCProvider.GetLoginURL should have comment or be unexported (golint)
    • Line 52: warning: exported method OIDCProvider.Exchange should have comment or be unexported (golint)
    • internal/client/nc.go
    • Line 10: warning: exported function StartNC should have comment or be unexported (golint)
    • Line 24: warning: exported function PrintListenerInfo should have comment or be unexported (golint)
    • internal/cmd/cmd.go
    • Line 9: warning: exported const BrinkProxyAddr should have comment (or a comment on this block) or be unexported (golint)
    • Line 13: warning: exported function Execute should have comment or be unexported (golint)
    • internal/util/util.go
    • Line 18: warning: exported function NormalizeWsUrl should have comment or be unexported (golint)
    • Line 46: warning: exported function NormalizeHttpUrl should have comment or be unexported (golint)
    • Line 89: warning: exported function ParseOrGenerateKey should have comment or be unexported (golint)
    • Line 107: warning: exported function GenerateSessionId should have comment or be unexported (golint)
    • Line 116: warning: exported function ParseKey should have comment or be unexported (golint)
    • Line 130: warning: exported function Seal should have comment or be unexported (golint)
    • Line 153: warning: exported function Open should have comment or be unexported (golint)
    • Line 179: warning: exported function SealBase58 should have comment or be unexported (golint)
    • Line 187: warning: exported function OpenBase58 should have comment or be unexported (golint)
    • Line 195: warning: exported function Checksum should have comment or be unexported (golint)
    • internal/client/forwarder.go
    • Line 13: warning: exported type OnConnect should have comment or be unexported (golint)
    • Line 15: warning: exported type Forwarder should have comment or be unexported (golint)
    • Line 26: warning: exported function NewForwarder should have comment or be unexported (golint)
    • Line 36: warning: exported method Forwarder.Start should have comment or be unexported (golint)
    • Line 71: warning: exported method Forwarder.OnTunnelConnect should have comment or be unexported (golint)
    • internal/client/token.go
    • Line 9: warning: exported function LoadAuthToken should have comment or be unexported (golint)
    • Line 17: warning: exported function StoreAuthToken should have comment or be unexported (golint)
    • Line 21: warning: exported function DeleteAuthToken should have comment or be unexported (golint)
    • internal/version/version.go
    • Line 9: warning: exported var Version should have comment or be unexported (golint)
    • Line 14: warning: exported function BuildVersion should have comment or be unexported (golint)
    • Line 21: warning: exported function GetReleaseInfo should have comment or be unexported (golint)
    • Line 25: warning: exported function GetReleaseInfoHandler should have comment or be unexported (golint)
    • Line 34: warning: exported function RegisterRoutes should have comment or be unexported (golint)
    • internal/proxy/target_filter.go
    • Line 49: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 71: warning: exported function ParsePortRange should have comment or be unexported (golint)
    • Line 97: warning: exported type TargetFilter should have comment or be unexported (golint)
    • internal/client/client.go
    • Line 20: warning: exported function Authenticate should have comment or be unexported (golint)
    • Line 28: warning: exported function StartClient should have comment or be unexported (golint)
    • Line 92: warning: exported type Client should have comment or be unexported (golint)
    • Line 275: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • internal/proxy/server.go
    • Line 23: warning: exported const IdHeader should have comment (or a comment on this block) or be unexported (golint)
    • Line 27: warning: exported function NewServer should have comment or be unexported (golint)
    • Line 61: warning: exported type Server should have comment or be unexported (golint)
    • Line 74: warning: exported method Server.RegisterRoutes should have comment or be unexported (golint)
    • internal/server/server.go
    • Line 17: warning: exported function StartServer should have comment or be unexported (golint)
    • Line 52: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • internal/cache/cache.go
    • Line 9: warning: exported const DefaultExpiration should have comment or be unexported (golint)
    • Line 11: warning: exported type Cache should have comment or be unexported (golint)
    • Line 17: warning: exported function NewCache should have comment or be unexported (golint)
    • Line 28: warning: exported function Prefixed should have comment or be unexported (golint)
    • internal/auth/server.go
    • Line 21: warning: exported function NewServer should have comment or be unexported (golint)
    • Line 43: warning: exported type Server should have comment or be unexported (golint)
    • Line 66: warning: exported method Server.RegisterRoutes should have comment or be unexported (golint)
    • Line 77: warning: exported method Server.GetPublicKey should have comment or be unexported (golint)
    • Line 81: warning: exported method Server.RegisterSession should have comment or be unexported (golint)
    • Line 93: warning: exported method Server.AuthenticateSession should have comment or be unexported (golint)
    • Line 298: 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!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!