Preparing report...

Report for github.com/mendersoftware/deviceauth

A+    Excellent!    Found 67 issues across 98 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!


gocyclo96%

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.


golint34%

Golint is a linter for Go source code.

    • deviceauth/model/count.go
    • Line 1: warning: package comment should be of the form "Package model ..." (golint)
    • Line 16: warning: exported type Count should have comment or be unexported (golint)
    • deviceauth/model/tenant.go
    • Line 1: warning: package comment should be of the form "Package model ..." (golint)
    • Line 23: warning: exported type NewTenant should have comment or be unexported (golint)
    • Line 27: warning: exported function ParseNewTenant should have comment or be unexported (golint)
    • deviceauth/utils/crypto.go
    • Line 33: warning: exported const ErrMsgVerify should have comment (or a comment on this block) or be unexported (golint)
    • Line 35: warning: comment on exported const PubKeyBlockType should be of the form "PubKeyBlockType ..." (golint)
    • Line 96: warning: comment on exported function ParsePubKey should be of the form "ParsePubKey ..." (golint)
    • Line 111: warning: exported function SerializePubKey should have comment or be unexported (golint)
    • deviceauth/store/mongo/datastore_mongo.go
    • Line 40: warning: exported const DbVersion should have comment (or a comment on this block) or be unexported (golint)
    • Line 51: warning: don't use underscores in Go names; var indexDevices_IdentityData should be indexDevicesIdentityData (golint)
    • Line 52: warning: don't use underscores in Go names; var indexDevices_IdentityDataSha256 should be indexDevicesIdentityDataSha256 (golint)
    • Line 53: warning: don't use underscores in Go names; var indexDevices_Status should be indexDevicesStatus (golint)
    • Line 54: warning: don't use underscores in Go names; var indexAuthSet_DeviceId_IdentityData_PubKey should be indexAuthSetDeviceIDIdentityDataPubKey (golint)
    • Line 55: warning: don't use underscores in Go names; var indexAuthSet_DeviceId_IdentityDataSha256_PubKey should be indexAuthSetDeviceIDIdentityDataSha256PubKey (golint)
    • Line 56: warning: don't use underscores in Go names; var indexAuthSet_IdentityDataSha256_PubKey should be indexAuthSetIdentityDataSha256PubKey (golint)
    • Line 59: warning: exported type DataStoreMongoConfig should have comment or be unexported (golint)
    • Line 72: warning: exported type DataStoreMongo should have comment or be unexported (golint)
    • Line 78: warning: exported function NewDataStoreMongoWithClient should have comment or be unexported (golint)
    • Line 84: warning: exported function NewDataStoreMongo should have comment or be unexported (golint)
    • Line 118: warning: exported method DataStoreMongo.ForEachDatabase should have comment or be unexported (golint)
    • Line 170: warning: exported method DataStoreMongo.Ping should have comment or be unexported (golint)
    • Line 174: warning: exported type DeviceFilter should have comment or be unexported (golint)
    • Line 176: warning: exported method DeviceFilter.MarshalBSON should have comment or be unexported (golint)
    • Line 206: warning: exported method DataStoreMongo.GetDevices should have comment or be unexported (golint)
    • Line 234: warning: exported method DataStoreMongo.StoreMigrationVersion should have comment or be unexported (golint)
    • Line 249: warning: exported method DataStoreMongo.GetDeviceById should have comment or be unexported (golint)
    • Line 260: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 268: warning: exported method DataStoreMongo.GetDeviceByIdentityDataHash should have comment or be unexported (golint)
    • Line 279: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 287: warning: exported method DataStoreMongo.AddDevice should have comment or be unexported (golint)
    • Line 305: warning: exported method DataStoreMongo.UpdateDevice should have comment or be unexported (golint)
    • Line 328: warning: exported method DataStoreMongo.DeleteDevice should have comment or be unexported (golint)
    • Line 343: warning: exported method DataStoreMongo.AddToken should have comment or be unexported (golint)
    • Line 361: warning: exported method DataStoreMongo.GetToken should have comment or be unexported (golint)
    • Line 374: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 382: warning: exported method DataStoreMongo.DeleteToken should have comment or be unexported (golint)
    • Line 397: warning: exported method DataStoreMongo.DeleteTokens should have comment or be unexported (golint)
    • Line 405: warning: exported method DataStoreMongo.DeleteTokenByDevId should have comment or be unexported (golint)
    • Line 424: warning: exported method DataStoreMongo.Migrate should have comment or be unexported (golint)
    • Line 473: warning: exported method DataStoreMongo.MigrateTenant should have comment or be unexported (golint)
    • Line 540: warning: exported method DataStoreMongo.AddAuthSet should have comment or be unexported (golint)
    • Line 558: warning: exported method DataStoreMongo.GetAuthSetByIdDataHashKey should have comment or be unexported (golint)
    • Line 571: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 579: warning: exported method DataStoreMongo.GetAuthSetById should have comment or be unexported (golint)
    • Line 579: warning: don't use underscores in Go names; method parameter auth_id should be authID (golint)
    • Line 587: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 595: warning: exported method DataStoreMongo.GetAuthSetsForDevice should have comment or be unexported (golint)
    • Line 614: warning: exported method DataStoreMongo.UpdateAuthSet should have comment or be unexported (golint)
    • Line 628: warning: exported method DataStoreMongo.UpdateAuthSetById should have comment or be unexported (golint)
    • Line 641: warning: exported method DataStoreMongo.DeleteAuthSetsForDevice should have comment or be unexported (golint)
    • Line 657: warning: exported method DataStoreMongo.DeleteAuthSetForDevice should have comment or be unexported (golint)
    • Line 671: warning: exported method DataStoreMongo.WithMultitenant should have comment or be unexported (golint)
    • Line 676: warning: exported method DataStoreMongo.WithAutomigrate should have comment or be unexported (golint)
    • Line 683: warning: exported method DataStoreMongo.PutLimit should have comment or be unexported (golint)
    • Line 702: warning: exported method DataStoreMongo.DeleteLimit should have comment or be unexported (golint)
    • Line 718: warning: exported method DataStoreMongo.GetLimit should have comment or be unexported (golint)
    • Line 728: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 736: warning: exported method DataStoreMongo.GetDevCountByStatus should have comment or be unexported (golint)
    • Line 754: warning: exported method DataStoreMongo.GetDeviceStatus should have comment or be unexported (golint)
    • Line 834: warning: exported method DataStoreMongo.GetTenantDbs should have comment or be unexported (golint)
    • deviceauth/model/devadm-authset-req.go
    • Line 1: warning: package comment should be of the form "Package model ..." (golint)
    • Line 27: warning: exported type DeviceAuthAttributes should have comment or be unexported (golint)
    • Line 29: warning: exported type DevAdmAuthSetReq should have comment or be unexported (golint)
    • Line 36: warning: exported function ParseDevAdmAuthSetReq should have comment or be unexported (golint)
    • Line 80: 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 87: warning: exported method DevAdmAuthSetReq.Validate should have comment or be unexported (golint)
    • deviceauth/store/mongo/datastore_mongo_cleanup.go
    • Line 30: warning: comment on exported method DataStoreMongo.GetDevicesBeingDecommissioned should be of the form "GetDevicesBeingDecommissioned ..." (golint)
    • Line 50: warning: comment on exported method DataStoreMongo.GetBrokenAuthSets should be of the form "GetBrokenAuthSets ..." (golint)
    • Line 117: warning: comment on exported method DataStoreMongo.DeleteDevicesBeingDecommissioned should be of the form "DeleteDevicesBeingDecommissioned ..." (golint)
    • Line 129: warning: comment on exported method DataStoreMongo.DeleteBrokenAuthSets should be of the form "DeleteBrokenAuthSets ..." (golint)
    • deviceauth/model/limit.go
    • Line 1: warning: package comment should be of the form "Package model ..." (golint)
    • Line 17: warning: exported const LimitMaxDeviceCount should have comment (or a comment on this block) or be unexported (golint)
    • Line 21: warning: exported var ValidLimits should have comment or be unexported (golint)
    • Line 24: warning: exported type Limit should have comment or be unexported (golint)
    • Line 29: warning: exported method Limit.IsLess should have comment or be unexported (golint)
    • Line 33: warning: exported function IsValidLimit should have comment or be unexported (golint)
    • deviceauth/model/device.go
    • Line 1: warning: package comment should be of the form "Package model ..." (golint)
    • Line 27: warning: exported const DevStatusAccepted should have comment (or a comment on this block) or be unexported (golint)
    • Line 40: warning: exported var DevStatuses should have comment or be unexported (golint)
    • Line 49: warning: comment on exported type Device should be of the form "Device ..." (with optional leading article) (golint)
    • Line 69: warning: exported type DeviceUpdate should have comment or be unexported (golint)
    • Line 79: warning: exported function NewDevice should have comment or be unexported (golint)
    • Line 79: warning: don't use underscores in Go names; func parameter id_data should be idData (golint)
    • Line 94: warning: exported type DeviceFilter should have comment or be unexported (golint)
    • Line 99: warning: exported method DeviceFilter.Validate should have comment or be unexported (golint)
    • Line 114: warning: exported method DeviceFilter.UnmarshalJSON should have comment or be unexported (golint)
    • Line 173: warning: exported method DeviceFilter.ParseForm should have comment or be unexported (golint)
    • Line 183: warning: exported type DeviceAttribute should have comment or be unexported (golint)
    • Line 190: warning: exported type DeviceInventoryUpdate should have comment or be unexported (golint)
    • deviceauth/utils/testing/util.go
    • Line 1: warning: package comment should be of the form "Package testing ..." (golint)
    • Line 35: warning: exported function AuthReqSign should have comment or be unexported (golint)
    • Line 82: warning: exported function LoadPrivKey should have comment or be unexported (golint)
    • Line 90: warning: exported function DecodePrivKey should have comment or be unexported (golint)
    • Line 108: warning: exported function LoadPubKeyStr should have comment or be unexported (golint)
    • Line 109: warning: don't use underscores in Go names; var pem_data should be pemData (golint)
    • Line 117: warning: exported function DecodePubKey should have comment or be unexported (golint)
    • deviceauth/api/http/routing.go
    • Line 1: warning: package comment should be of the form "Package http ..." (golint)
    • Line 24: warning: exported type HttpOptionsGenerator should have comment or be unexported (golint)
    • Line 26: warning: exported function AllowHeaderOptionsGenerator should have comment or be unexported (golint)
    • Line 39: warning: comment on exported function AutogenOptionsRoutes should be of the form "AutogenOptionsRoutes ..." (golint)
    • deviceauth/jwt/jwt.go
    • Line 1: warning: package comment should be of the form "Package jwt ..." (golint)
    • Line 24: warning: exported var ErrTokenExpired should have comment or be unexported (golint)
    • Line 44: warning: exported function NewJWTHandlerRS256 should have comment or be unexported (golint)
    • Line 50: warning: exported method JWTHandlerRS256.ToJWT should have comment or be unexported (golint)
    • Line 59: warning: exported method JWTHandlerRS256.FromJWT should have comment or be unexported (golint)
    • Line 75: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 85: 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)
    • deviceauth/client/inventory/client.go
    • Line 1: warning: package comment should be of the form "Package inventory ..." (golint)
    • Line 42: warning: comment on exported type Client should be of the form "Client ..." (with optional leading article) (golint)
    • Line 54: warning: exported function NewClient should have comment or be unexported (golint)
    • deviceauth/utils/http.go
    • Line 24: warning: exported function ReadBodyRaw should have comment or be unexported (golint)
    • Line 34: warning: exported function JoinURL should have comment or be unexported (golint)
    • deviceauth/model/preauthreq.go
    • Line 1: warning: package comment should be of the form "Package model ..." (golint)
    • Line 27: warning: exported type PreAuthReq should have comment or be unexported (golint)
    • Line 34: warning: exported function ParsePreAuthReq should have comment or be unexported (golint)
    • Line 50: warning: exported method PreAuthReq.Validate should have comment or be unexported (golint)
    • Line 57: 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)
    • deviceauth/keys/key.go
    • Line 1: warning: package comment should be of the form "Package keys ..." (golint)
    • Line 26: warning: exported const ErrMsgPrivKeyReadFailed should have comment (or a comment on this block) or be unexported (golint)
    • Line 30: warning: exported function LoadRSAPrivate should have comment or be unexported (golint)
    • deviceauth/cmd/commands.go
    • Line 1: warning: package comment should be of the form "Package cmd ..." (golint)
    • Line 39: warning: exported var NowUnixMilis should have comment or be unexported (golint)
    • Line 54: warning: exported function Migrate should have comment or be unexported (golint)
    • Line 102: warning: exported function Maintenance should have comment or be unexported (golint)
    • Line 147: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 196: warning: exported function PropagateStatusesInventory should have comment or be unexported (golint)
    • Line 218: warning: exported function PropagateIdDataInventory should have comment or be unexported (golint)
    • Line 438: warning: exported const WorkflowsDeviceLimitSender should have comment (or a comment on this block) or be unexported (golint)
    • deviceauth/client/tenant/client_tenantadm.go
    • Line 1: warning: package comment should be of the form "Package tenant ..." (golint)
    • Line 31: warning: exported const TenantHealthURI should have comment (or a comment on this block) or be unexported (golint)
    • Line 32: warning: comment on exported const TenantVerifyUri should be of the form "TenantVerifyUri ..." (golint)
    • Line 41: warning: exported const MsgErrTokenVerificationFailed should have comment (or a comment on this block) or be unexported (golint)
    • Line 44: warning: exported function IsErrTokenVerificationFailed should have comment or be unexported (golint)
    • Line 48: warning: exported function MakeErrTokenVerificationFailed should have comment or be unexported (golint)
    • Line 52: warning: comment on exported type Config should be of the form "Config ..." (with optional leading article) (golint)
    • Line 90: warning: exported method Client.CheckHealth should have comment or be unexported (golint)
    • Line 125: warning: receiver name tc should be consistent with previous receiver name c for Client (golint)
    • Line 175: warning: receiver name tc should be consistent with previous receiver name c for Client (golint)
    • Line 214: warning: exported type User should have comment or be unexported (golint)
    • Line 220: warning: exported method Client.GetTenantUsers should have comment or be unexported (golint)
    • Line 220: warning: receiver name tc should be consistent with previous receiver name c for Client (golint)
    • deviceauth/model/authset.go
    • Line 1: warning: package comment should be of the form "Package model ..." (golint)
    • Line 24: warning: exported const AuthSetKeyIdData should have comment (or a comment on this block) or be unexported (golint)
    • Line 31: warning: exported type AuthSet should have comment or be unexported (golint)
    • Line 42: warning: exported type DevAuthSet should have comment or be unexported (golint)
    • Line 47: warning: exported type AuthSetUpdate should have comment or be unexported (golint)
    • Line 58: warning: exported type DevAdmAuthSet should have comment or be unexported (golint)
    • Line 68: warning: exported function NewDevAdmAuthSet should have comment or be unexported (golint)
    • deviceauth/model/authreq.go
    • Line 1: warning: package comment should be of the form "Package model ..." (golint)
    • Line 23: warning: comment on exported type AuthReq should be of the form "AuthReq ..." (with optional leading article) (golint)
    • Line 34: warning: exported method AuthReq.Validate should have comment or be unexported (golint)
    • Line 65: 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)
    • deviceauth/model/status.go
    • Line 1: warning: package comment should be of the form "Package model ..." (golint)
    • Line 16: warning: exported type Status should have comment or be unexported (golint)
    • deviceauth/store/datastore.go
    • Line 28: warning: comment on exported var ErrDevNotFound should be of the form "ErrDevNotFound ..." (golint)
    • Line 30: warning: comment on exported var ErrTokenNotFound should be of the form "ErrTokenNotFound ..." (golint)
    • Line 32: warning: comment on exported var ErrAuthSetNotFound should be of the form "ErrAuthSetNotFound ..." (golint)
    • Line 34: warning: comment on exported var ErrLimitNotFound should be of the form "ErrLimitNotFound ..." (golint)
    • Line 36: warning: comment on exported var ErrObjectExists should be of the form "ErrObjectExists ..." (golint)
    • Line 38: warning: comment on exported var ErrDevStatusBroken should be of the form "ErrDevStatusBroken ..." (golint)
    • Line 43: warning: exported const NoCollectionErrMsg should have comment (or a comment on this block) or be unexported (golint)
    • Line 46: warning: exported type AuthSetFilter should have comment or be unexported (golint)
    • Line 56: warning: comment on exported type DataStore should be of the form "DataStore ..." (with optional leading article) (golint)
    • Line 116: warning: don't use underscores in Go names; interface method parameter dev_id should be devID (golint)
    • Line 132: warning: don't use underscores in Go names; interface method parameter dev_id should be devID (golint)
    • deviceauth/client/orchestrator/client_orchestrator.go
    • Line 33: warning: comment on exported const DeviceDecommissioningOrchestratorUri should be of the form "DeviceDecommissioningOrchestratorUri ..." (golint)
    • Line 35: warning: exported const ProvisionDeviceOrchestratorUri should have comment (or a comment on this block) or be unexported (golint)
    • Line 70: warning: exported function NewClient should have comment or be unexported (golint)
    • Line 83: warning: exported method Client.CheckHealth should have comment or be unexported (golint)
    • Line 116: warning: exported method Client.SubmitDeviceDecommisioningJob should have comment or be unexported (golint)
    • Line 116: warning: receiver name co should be consistent with previous receiver name c for Client (golint)
    • Line 163: warning: exported method Client.SubmitProvisionDeviceJob should have comment or be unexported (golint)
    • Line 163: warning: receiver name co should be consistent with previous receiver name c for Client (golint)
    • Line 210: warning: exported method Client.SubmitUpdateDeviceStatusJob should have comment or be unexported (golint)
    • Line 210: warning: receiver name co should be consistent with previous receiver name c for Client (golint)
    • Line 256: warning: exported method Client.SubmitDeviceLimitWarning should have comment or be unexported (golint)
    • Line 256: warning: receiver name co should be consistent with previous receiver name c for Client (golint)
    • Line 301: warning: exported method Client.SubmitUpdateDeviceInventoryJob should have comment or be unexported (golint)
    • Line 301: warning: receiver name co should be consistent with previous receiver name c for Client (golint)
    • deviceauth/store/mongo/migration_1_1_0.go
    • Line 1: warning: package comment should be of the form "Package mongo ..." (golint)
    • Line 30: warning: don't use underscores in Go names; type migration_1_1_0 should be migration1_1_0 (golint)
    • Line 35: warning: don't use underscores in Go names; type device_0_1_0 should be device0_1_0 (golint)
    • Line 45: warning: don't use underscores in Go names; type token_0_1_0 should be token0_1_0 (golint)
    • deviceauth/utils/time.go
    • Line 1: warning: package comment should be of the form "Package utils ..." (golint)
    • Line 18: warning: exported function UnixMilis should have comment or be unexported (golint)
    • Line 22: warning: exported type Clock should have comment or be unexported (golint)
    • Line 29: warning: exported function NewClock should have comment or be unexported (golint)
    • Line 45: warning: exported function NewMockClock should have comment or be unexported (golint)
    • deviceauth/api/context.go
    • Line 1: warning: package comment should be of the form "Package api ..." (golint)
    • Line 16: warning: exported type RequestContext should have comment or be unexported (golint)
    • deviceauth/cache/cache.go
    • Line 44: warning: package comment is detached; there should be no blank lines between it and the package statement (golint)
    • Line 62: warning: exported const IdTypeDevice should have comment (or a comment on this block) or be unexported (golint)
    • Line 67: warning: exported var ErrTooManyRequests should have comment or be unexported (golint)
    • Line 70: warning: comment on exported type Cache should be of the form "Cache ..." (with optional leading article) (golint)
    • Line 96: warning: exported type RedisCache should have comment or be unexported (golint)
    • Line 102: warning: exported function NewRedisCache should have comment or be unexported (golint)
    • Line 120: warning: exported method RedisCache.WithClock should have comment or be unexported (golint)
    • Line 125: warning: exported method RedisCache.Throttle should have comment or be unexported (golint)
    • Line 187: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 275: warning: exported method RedisCache.CacheToken should have comment or be unexported (golint)
    • Line 282: warning: exported method RedisCache.DeleteToken should have comment or be unexported (golint)
    • Line 287: warning: exported method RedisCache.GetLimits should have comment or be unexported (golint)
    • Line 307: warning: exported method RedisCache.CacheLimits should have comment or be unexported (golint)
    • Line 318: warning: exported method RedisCache.FlushDB should have comment or be unexported (golint)
    • Line 322: warning: exported function KeyQuota should have comment or be unexported (golint)
    • Line 326: warning: exported function KeyBurst should have comment or be unexported (golint)
    • Line 330: warning: exported function KeyToken should have comment or be unexported (golint)
    • Line 334: warning: exported function KeyLimits should have comment or be unexported (golint)
    • Line 345: warning: comment on exported function LimitsEmpty should be of the form "LimitsEmpty ..." (golint)
    • deviceauth/api/http/context.go
    • Line 1: warning: package comment should be of the form "Package http ..." (golint)
    • Line 23: warning: exported function ContextFromRequest should have comment or be unexported (golint)
    • deviceauth/config/config.go
    • Line 22: warning: exported const SettingListen should have comment (or a comment on this block) or be unexported (golint)
    • Line 89: warning: exported var Validators should have comment or be unexported (golint)
    • deviceauth/version.go
    • Line 17: warning: comment on exported var Commit should be of the form "Commit ..." (golint)
    • Line 20: warning: comment on exported var Tag should be of the form "Tag ..." (golint)
    • Line 23: warning: comment on exported var Branch should be of the form "Branch ..." (golint)
    • Line 29: warning: comment on exported var BuildNumber should be of the form "BuildNumber ..." (golint)
    • Line 33: warning: exported function CreateVersionString should have comment or be unexported (golint)
    • deviceauth/api/http/api_handler.go
    • Line 1: warning: package comment should be of the form "Package http ..." (golint)
    • Line 20: warning: comment on exported type ApiHandler should be of the form "ApiHandler ..." (with optional leading article) (golint)
    • deviceauth/server.go
    • Line 37: warning: exported function SetupAPI should have comment or be unexported (golint)
    • Line 52: warning: exported function RunServer should have comment or be unexported (golint)
    • deviceauth/devauth/devauth.go
    • Line 1: warning: package comment should be of the form "Package devauth ..." (golint)
    • Line 53: warning: exported const MsgErrDevAuthUnauthorized should have comment (or a comment on this block) or be unexported (golint)
    • Line 58: warning: exported var ErrDevAuthUnauthorized should have comment or be unexported (golint)
    • Line 69: warning: exported function IsErrDevAuthUnauthorized should have comment or be unexported (golint)
    • Line 73: warning: exported function MakeErrDevAuthUnauthorized should have comment or be unexported (golint)
    • Line 77: warning: exported function IsErrDevAuthBadRequest should have comment or be unexported (golint)
    • Line 81: warning: exported function MakeErrDevAuthBadRequest should have comment or be unexported (golint)
    • Line 91: warning: comment on exported type ApiClientGetter should be of the form "ApiClientGetter ..." (with optional leading article) (golint)
    • Line 98: warning: comment on exported type App should be of the form "App ..." (with optional leading article) (golint)
    • Line 105: warning: don't use underscores in Go names; interface method parameter dev_id should be devID (golint)
    • Line 106: warning: don't use underscores in Go names; interface method parameter dev_id should be devID (golint)
    • Line 107: warning: don't use underscores in Go names; interface method parameter dev_id should be devID (golint)
    • Line 107: warning: don't use underscores in Go names; interface method parameter auth_id should be authID (golint)
    • Line 108: warning: don't use underscores in Go names; interface method parameter dev_id should be devID (golint)
    • Line 108: warning: don't use underscores in Go names; interface method parameter auth_id should be authID (golint)
    • Line 109: warning: don't use underscores in Go names; interface method parameter dev_id should be devID (golint)
    • Line 109: warning: don't use underscores in Go names; interface method parameter auth_id should be authID (golint)
    • Line 110: warning: don't use underscores in Go names; interface method parameter dev_id should be devID (golint)
    • Line 110: warning: don't use underscores in Go names; interface method parameter auth_id should be authID (golint)
    • Line 117: warning: don't use underscores in Go names; interface method parameter tenant_id should be tenantID (golint)
    • Line 118: warning: don't use underscores in Go names; interface method parameter tenant_id should be tenantID (golint)
    • Line 121: warning: don't use underscores in Go names; interface method parameter tenant_id should be tenantID (golint)
    • Line 125: warning: don't use underscores in Go names; interface method parameter tenant_id should be tenantID (golint)
    • Line 130: warning: exported type DevAuth should have comment or be unexported (golint)
    • Line 144: warning: exported type Config should have comment or be unexported (golint)
    • Line 157: warning: exported function NewDevAuth should have comment or be unexported (golint)
    • Line 178: warning: exported method DevAuth.HealthCheck should have comment or be unexported (golint)
    • Line 380: warning: exported method DevAuth.SubmitAuthRequest should have comment or be unexported (golint)
    • Line 654: warning: exported method DevAuth.GetDevices should have comment or be unexported (golint)
    • Line 669: warning: exported method DevAuth.GetDevice should have comment or be unexported (golint)
    • Line 751: warning: comment on exported method DevAuth.DeleteAuthSet should be of the form "DeleteAuthSet ..." (golint)
    • Line 825: warning: exported method DevAuth.AcceptDeviceAuth should have comment or be unexported (golint)
    • Line 825: warning: don't use underscores in Go names; method parameter device_id should be deviceID (golint)
    • Line 825: warning: don't use underscores in Go names; method parameter auth_id should be authID (golint)
    • Line 959: warning: exported method DevAuth.RejectDeviceAuth should have comment or be unexported (golint)
    • Line 959: warning: don't use underscores in Go names; method parameter device_id should be deviceID (golint)
    • Line 959: warning: don't use underscores in Go names; method parameter auth_id should be authID (golint)
    • Line 968: warning: exported method DevAuth.ResetDeviceAuth should have comment or be unexported (golint)
    • Line 968: warning: don't use underscores in Go names; method parameter device_id should be deviceID (golint)
    • Line 968: warning: don't use underscores in Go names; method parameter auth_id should be authID (golint)
    • Line 988: warning: exported method DevAuth.PreauthorizeDevice should have comment or be unexported (golint)
    • Line 1078: warning: exported method DevAuth.RevokeToken should have comment or be unexported (golint)
    • Line 1115: warning: exported method DevAuth.VerifyToken should have comment or be unexported (golint)
    • Line 1342: warning: exported method DevAuth.GetLimit should have comment or be unexported (golint)
    • Line 1355: warning: exported method DevAuth.GetTenantLimit should have comment or be unexported (golint)
    • Line 1355: warning: don't use underscores in Go names; method parameter tenant_id should be tenantID (golint)
    • Line 1372: warning: exported method DevAuth.WithCache should have comment or be unexported (golint)
    • Line 1377: warning: exported method DevAuth.WithClock should have comment or be unexported (golint)
    • Line 1382: warning: exported method DevAuth.SetTenantLimit should have comment or be unexported (golint)
    • Line 1382: warning: don't use underscores in Go names; method parameter tenant_id should be tenantID (golint)
    • Line 1400: warning: exported method DevAuth.DeleteTenantLimit should have comment or be unexported (golint)
    • Line 1400: warning: don't use underscores in Go names; method parameter tenant_id should be tenantID (golint)
    • Line 1418: warning: exported method DevAuth.GetDevCountByStatus should have comment or be unexported (golint)
    • Line 1445: warning: exported method DevAuth.DeleteTokens should have comment or be unexported (golint)
    • Line 1484: warning: exported method DevAuth.ProvisionTenant should have comment or be unexported (golint)
    • Line 1484: warning: don't use underscores in Go names; method parameter tenant_id should be tenantID (golint)
    • Line 1494: warning: exported method DevAuth.GetTenantDeviceStatus should have comment or be unexported (golint)
    • deviceauth/client/orchestrator/models.go
    • Line 21: warning: comment on exported type DecommissioningReq should be of the form "DecommissioningReq ..." (with optional leading article) (golint)
    • Line 60: warning: exported type DeviceLimitWarning should have comment or be unexported (golint)
    • Line 72: warning: exported method DeviceLimitWarning.Validate should have comment or be unexported (golint)
    • deviceauth/access/checker.go
    • Line 19: warning: exported type Checker should have comment or be unexported (golint)
    • Line 35: warning: exported function Merge should have comment or be unexported (golint)
    • Line 39: warning: exported type PermissionError should have comment or be unexported (golint)
    • deviceauth/utils/search.go
    • Line 1: warning: package comment should be of the form "Package utils ..." (golint)
    • Line 16: warning: comment on exported function ContainsString should be of the form "ContainsString ..." (golint)
    • deviceauth/middleware.go
    • Line 33: warning: exported const EnvProd should have comment (or a comment on this block) or be unexported (golint)
    • Line 129: warning: exported function SetupMiddleware should have comment or be unexported (golint)
    • deviceauth/api/http/api_devauth.go
    • Line 1: warning: package comment should be of the form "Package http ..." (golint)
    • Line 64: warning: exported const HdrAuthReqSign should have comment (or a comment on this block) or be unexported (golint)
    • Line 72: warning: exported var ErrIncorrectStatus should have comment or be unexported (golint)
    • Line 76: warning: exported type DevAuthApiHandlers should have comment or be unexported (golint)
    • Line 81: warning: exported type DevAuthApiStatus should have comment or be unexported (golint)
    • Line 85: warning: exported function NewDevAuthApiHandlers should have comment or be unexported (golint)
    • Line 92: warning: exported method DevAuthApiHandlers.GetApp should have comment or be unexported (golint)
    • Line 135: warning: exported method DevAuthApiHandlers.AliveHandler should have comment or be unexported (golint)
    • Line 139: warning: exported method DevAuthApiHandlers.HealthCheckHandler should have comment or be unexported (golint)
    • Line 153: warning: exported method DevAuthApiHandlers.SubmitAuthRequestHandler should have comment or be unexported (golint)
    • Line 228: warning: exported method DevAuthApiHandlers.PostDevicesV2Handler should have comment or be unexported (golint)
    • Line 260: warning: exported method DevAuthApiHandlers.SearchDevicesV2Handler should have comment or be unexported (golint)
    • Line 329: warning: exported method DevAuthApiHandlers.GetDevicesV2Handler should have comment or be unexported (golint)
    • Line 334: warning: exported method DevAuthApiHandlers.GetDevicesCountHandler should have comment or be unexported (golint)
    • Line 362: warning: exported method DevAuthApiHandlers.GetDeviceV2Handler should have comment or be unexported (golint)
    • Line 382: warning: exported method DevAuthApiHandlers.DeleteDeviceHandler should have comment or be unexported (golint)
    • Line 402: warning: exported method DevAuthApiHandlers.DeleteDeviceAuthSetHandler should have comment or be unexported (golint)
    • Line 423: warning: exported method DevAuthApiHandlers.DeleteTokenHandler should have comment or be unexported (golint)
    • Line 443: warning: exported method DevAuthApiHandlers.VerifyTokenHandler should have comment or be unexported (golint)
    • Line 484: warning: exported method DevAuthApiHandlers.UpdateDeviceStatusHandler should have comment or be unexported (golint)
    • Line 530: warning: exported type LimitValue should have comment or be unexported (golint)
    • Line 534: warning: exported method DevAuthApiHandlers.PutTenantLimitHandler should have comment or be unexported (golint)
    • Line 570: warning: exported method DevAuthApiHandlers.DeleteTenantLimitHandler should have comment or be unexported (golint)
    • Line 593: warning: exported method DevAuthApiHandlers.GetTenantLimitHandler should have comment or be unexported (golint)
    • Line 617: warning: exported method DevAuthApiHandlers.GetLimitHandler should have comment or be unexported (golint)
    • Line 640: warning: exported method DevAuthApiHandlers.DeleteTokensHandler should have comment or be unexported (golint)
    • Line 662: warning: exported method DevAuthApiHandlers.GetAuthSetStatusHandler should have comment or be unexported (golint)
    • Line 684: warning: exported method DevAuthApiHandlers.ProvisionTenantHandler should have comment or be unexported (golint)
    • Line 705: warning: exported method DevAuthApiHandlers.GetTenantDeviceStatus should have comment or be unexported (golint)
    • Line 729: warning: exported method DevAuthApiHandlers.GetTenantDevicesHandler should have comment or be unexported (golint)
    • Line 745: warning: exported method DevAuthApiHandlers.GetTenantDevicesCountHandler should have comment or be unexported (golint)
    • Line 771: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • deviceauth/jwt/claims.go
    • Line 25: warning: exported type Claims should have comment or be unexported (golint)
    • Line 50: warning: exported type Time should have comment or be unexported (golint)
    • Line 54: warning: exported method Time.MarshalJSON should have comment or be unexported (golint)
    • Line 59: warning: exported method Time.UnmarshalJSON should have comment or be unexported (golint)
    • deviceauth/utils/to/pointer.go
    • Line 1: warning: package comment should be of the form "Package to ..." (golint)
    • Line 20: warning: exported function Time should have comment or be unexported (golint)
    • Line 27: warning: exported function TimePtr should have comment or be unexported (golint)
    • deviceauth/client/testing/client.go
    • Line 1: warning: package comment should be of the form "Package testing ..." (golint)
    • Line 23: warning: exported type TestReqData should have comment or be unexported (golint)
    • Line 30: warning: comment on exported function NewMockServer should be of the form "NewMockServer ..." (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign90%

IneffAssign detects ineffectual assignments in Go code.


misspell97%

Misspell Finds commonly misspelled English words