Gofmt formats Go programs. We run gofmt -s
on your code, where -s
is for the "simplify" command
No problems detected. Good job!
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!
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!
Golint is a linter for Go source code.
-
yubikey-basic-auth-proxy/web.go
- Line 90: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
- Line 99: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
- Line 144: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
-
yubikey-basic-auth-proxy/acl.go
- Line 11: warning: exported type ScryptEntry should have comment or be unexported (golint)
- Line 17: warning: exported method ScryptEntry.Test should have comment or be unexported (golint)
- Line 25: warning: exported type UserEntry should have comment or be unexported (golint)
- Line 31: warning: exported const SALT_LENGTH should have comment or be unexported (golint)
- Line 33: warning: exported function NewUserEntry should have comment or be unexported (golint)
- Line 47: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
- Line 64: warning: exported type ACLConfig should have comment or be unexported (golint)
- Line 69: warning: exported function NewACLConfig should have comment or be unexported (golint)
- Line 76: warning: exported function NewACLConfigFromReader should have comment or be unexported (golint)
- Line 83: warning: exported method ACLConfig.EncodeTo should have comment or be unexported (golint)
-
yubikey-basic-auth-proxy/cache.go
- Line 8: warning: exported type EvictionCallback should have comment or be unexported (golint)
- Line 10: warning: exported type CacheValue should have comment or be unexported (golint)
- Line 53: warning: comment on exported type Cache should be of the form "Cache ..." (with optional leading article) (golint)
- Line 64: warning: exported function NewCache should have comment or be unexported (golint)
- Line 77: warning: exported method Cache.Start should have comment or be unexported (golint)
- Line 134: warning: exported method Cache.Stop should have comment or be unexported (golint)
- Line 138: warning: exported method Cache.AddOrUpdate should have comment or be unexported (golint)
- Line 151: warning: exported method Cache.Contains should have comment or be unexported (golint)
- Line 160: warning: exported type CacheExpirationSorter should have comment or be unexported (golint)
-
yubikey-basic-auth-proxy/logging.go
- Line 10: warning: exported type LogLevel should have comment or be unexported (golint)
- Line 34: warning: exported type LogRecord should have comment or be unexported (golint)
- Line 41: warning: exported type Logger should have comment or be unexported (golint)
- Line 45: warning: comment on exported type MethodLogger should be of the form "MethodLogger ..." (with optional leading article) (golint)
- Line 50: warning: exported method MethodLogger.Debug should have comment or be unexported (golint)
- Line 54: warning: exported method MethodLogger.Info should have comment or be unexported (golint)
- Line 58: warning: exported method MethodLogger.Warn should have comment or be unexported (golint)
- Line 66: warning: exported type LogWriter should have comment or be unexported (golint)
- Line 70: warning: comment on exported type LogLevelFilter should be of the form "LogLevelFilter ..." (with optional leading article) (golint)
- Line 76: warning: exported method LogLevelFilter.Log should have comment or be unexported (golint)
- Line 82: warning: comment on exported type LogRecordLogger should be of the form "LogRecordLogger ..." (with optional leading article) (golint)
- Line 87: warning: exported method LogRecordLogger.Log should have comment or be unexported (golint)
- Line 96: warning: comment on exported type JSONOutputter should be of the form "JSONOutputter ..." (with optional leading article) (golint)
-
yubikey-basic-auth-proxy/logtypes.go
- Line 3: warning: exported type CouldNotFindUsername should have comment or be unexported (golint)
- Line 7: warning: exported type PasswordOrOTPFailed should have comment or be unexported (golint)
- Line 12: warning: exported type CouldNotValidateAgainstYubico should have comment or be unexported (golint)
- Line 16: warning: exported type UnableToValidateCredentials should have comment or be unexported (golint)
- Line 21: warning: exported type UnableToLog should have comment or be unexported (golint)
- Line 25: warning: exported type AuthenticationSuccesful should have comment or be unexported (golint)
- Line 29: warning: exported type SessionExpired should have comment or be unexported (golint)
- Line 33: warning: exported type Proxying should have comment or be unexported (golint)
- Line 38: warning: exported type AskedUserToAuthenticate should have comment or be unexported (golint)
- Line 42: warning: exported type UnableToGenerateRandomString should have comment or be unexported (golint)
-
yubikey-basic-auth-proxy/main.go
- Line 18: warning: exported const STDIN_PASSWORD_ARG should have comment (or a comment on this block) or be unexported (golint)
- Line 54: warning: exported type CookieCache should have comment or be unexported (golint)
- Line 63: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
- Line 70: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
-
yubikey-basic-auth-proxy/scrypt.go
- Line 7: warning: comment on exported type ScryptData should be of the form "ScryptData ..." (with optional leading article) (golint)
- Line 15: warning: comment on exported var DefaultScryptData should be of the form "DefaultScryptData ..." (golint)
- Line 24: warning: exported method ScryptData.CalculateHash should have comment or be unexported (golint)
Checks whether your project has a LICENSE file.
No problems detected. Good job!
IneffAssign detects ineffectual assignments in Go code.
No problems detected. Good job!
Misspell Finds commonly misspelled English words
No problems detected. Good job!