Preparing report...

Report for github.com/tecsisa/foulkon

A+    Excellent!    Found 35 issues across 68 files

Tweet

gofmt95%

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!


gocyclo91%

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.

    • foulkon/api/util.go
    • Line 187: warning: cyclomatic complexity 31 of function AreValidResources() is high (> 15) (gocyclo)
    • Line 301: warning: cyclomatic complexity 17 of function validateFilter() is high (> 15) (gocyclo)
    • foulkon/api/authz.go
    • Line 365: warning: cyclomatic complexity 30 of function (*Restrictions).insertRestriction() is high (> 15) (gocyclo)
    • Line 537: warning: cyclomatic complexity 18 of function isAllowedResource() is high (> 15) (gocyclo)

golint51%

Golint is a linter for Go source code.

    • foulkon/database/postgresql/user.go
    • Line 13: warning: exported method PostgresRepo.AddUser should have comment or be unexported (golint)
    • Line 38: warning: exported method PostgresRepo.GetUserByExternalID should have comment or be unexported (golint)
    • Line 61: warning: exported method PostgresRepo.GetUserByID should have comment or be unexported (golint)
    • Line 84: warning: exported method PostgresRepo.GetUsersFiltered should have comment or be unexported (golint)
    • Line 116: warning: exported method PostgresRepo.UpdateUser should have comment or be unexported (golint)
    • Line 140: warning: exported method PostgresRepo.RemoveUser should have comment or be unexported (golint)
    • Line 170: warning: exported method PostgresRepo.GetGroupsByUserID should have comment or be unexported (golint)
    • foulkon/http/policy.go
    • Line 12: warning: exported type CreatePolicyRequest should have comment or be unexported (golint)
    • Line 18: warning: exported type UpdatePolicyRequest should have comment or be unexported (golint)
    • Line 26: warning: exported type ListPoliciesResponse should have comment or be unexported (golint)
    • Line 33: warning: exported type ListAllPoliciesResponse should have comment or be unexported (golint)
    • Line 40: warning: exported type ListAttachedGroupsResponse should have comment or be unexported (golint)
    • Line 49: warning: exported method WorkerHandler.HandleAddPolicy should have comment or be unexported (golint)
    • Line 63: warning: exported method WorkerHandler.HandleGetPolicyByName should have comment or be unexported (golint)
    • Line 76: warning: exported method WorkerHandler.HandleListPolicies should have comment or be unexported (golint)
    • Line 99: warning: exported method WorkerHandler.HandleListAllPolicies should have comment or be unexported (golint)
    • Line 118: warning: exported method WorkerHandler.HandleUpdatePolicy should have comment or be unexported (golint)
    • Line 131: warning: exported method WorkerHandler.HandleRemovePolicy should have comment or be unexported (golint)
    • Line 143: warning: exported method WorkerHandler.HandleListAttachedGroups should have comment or be unexported (golint)
    • foulkon/http/proxy.go
    • Line 21: warning: comment on exported const INVALID_DEST_HOST_URL should be of the form "INVALID_DEST_HOST_URL ..." (golint)
    • Line 23: warning: exported const HOST_UNREACHABLE should have comment (or a comment on this block) or be unexported (golint)
    • Line 31: warning: exported type CreateProxyResourceRequest should have comment or be unexported (golint)
    • Line 37: warning: exported type UpdateProxyResourceRequest should have comment or be unexported (golint)
    • Line 45: warning: exported type ProxyResources should have comment or be unexported (golint)
    • Line 49: warning: exported type ListProxyResourcesResponse should have comment or be unexported (golint)
    • Line 58: warning: exported method ProxyHandler.HandleRequest should have comment or be unexported (golint)
    • Line 109: warning: exported method WorkerHandler.HandleAddProxyResource should have comment or be unexported (golint)
    • Line 123: warning: exported method WorkerHandler.HandleGetProxyResourceByName should have comment or be unexported (golint)
    • Line 136: warning: exported method WorkerHandler.HandleListProxyResource should have comment or be unexported (golint)
    • Line 159: warning: exported method WorkerHandler.HandleUpdateProxyResource should have comment or be unexported (golint)
    • Line 172: warning: exported method WorkerHandler.HandleRemoveProxyResource should have comment or be unexported (golint)
    • foulkon/database/error.go
    • Line 6: warning: comment on exported const INTERNAL_ERROR should be of the form "INTERNAL_ERROR ..." (golint)
    • Line 9: warning: comment on exported const USER_NOT_FOUND should be of the form "USER_NOT_FOUND ..." (golint)
    • Line 12: warning: comment on exported const GROUP_NOT_FOUND should be of the form "GROUP_NOT_FOUND ..." (golint)
    • Line 15: warning: comment on exported const GROUP_USER_RELATION_NOT_FOUND should be of the form "GROUP_USER_RELATION_NOT_FOUND ..." (golint)
    • Line 18: warning: comment on exported const GROUP_POLICY_RELATION_NOT_FOUND should be of the form "GROUP_POLICY_RELATION_NOT_FOUND ..." (golint)
    • Line 21: warning: comment on exported const POLICY_NOT_FOUND should be of the form "POLICY_NOT_FOUND ..." (golint)
    • Line 24: warning: comment on exported const PROXY_RESOURCE_NOT_FOUND should be of the form "PROXY_RESOURCE_NOT_FOUND ..." (golint)
    • Line 27: warning: comment on exported const AUTH_OIDC_PROVIDER_NOT_FOUND should be of the form "AUTH_OIDC_PROVIDER_NOT_FOUND ..." (golint)
    • Line 31: warning: exported type Error should have comment or be unexported (golint)
    • foulkon/middleware/auth/oidc/oidc.go
    • Line 64: warning: comment on exported method OIDCAuthConnector.Authenticate should be of the form "Authenticate ..." (golint)
    • Line 77: warning: comment on exported method OIDCAuthConnector.RetrieveUserID should be of the form "RetrieveUserID ..." (golint)
    • foulkon/http/group.go
    • Line 12: warning: exported type CreateGroupRequest should have comment or be unexported (golint)
    • Line 17: warning: exported type UpdateGroupRequest should have comment or be unexported (golint)
    • Line 24: warning: exported type ListGroupsResponse should have comment or be unexported (golint)
    • Line 31: warning: exported type ListAllGroupsResponse should have comment or be unexported (golint)
    • Line 38: warning: exported type ListMembersResponse should have comment or be unexported (golint)
    • Line 45: warning: exported type ListAttachedGroupPoliciesResponse should have comment or be unexported (golint)
    • Line 54: warning: exported method WorkerHandler.HandleAddGroup should have comment or be unexported (golint)
    • Line 67: warning: exported method WorkerHandler.HandleGetGroupByName should have comment or be unexported (golint)
    • Line 79: warning: exported method WorkerHandler.HandleListGroups should have comment or be unexported (golint)
    • Line 102: warning: exported method WorkerHandler.HandleListAllGroups should have comment or be unexported (golint)
    • Line 121: warning: exported method WorkerHandler.HandleUpdateGroup should have comment or be unexported (golint)
    • Line 134: warning: exported method WorkerHandler.HandleRemoveGroup should have comment or be unexported (golint)
    • Line 146: warning: exported method WorkerHandler.HandleAddMember should have comment or be unexported (golint)
    • Line 158: warning: exported method WorkerHandler.HandleRemoveMember should have comment or be unexported (golint)
    • Line 170: warning: exported method WorkerHandler.HandleListMembers should have comment or be unexported (golint)
    • Line 188: warning: exported method WorkerHandler.HandleAttachPolicyToGroup should have comment or be unexported (golint)
    • Line 200: warning: exported method WorkerHandler.HandleDetachPolicyToGroup should have comment or be unexported (golint)
    • Line 212: warning: exported method WorkerHandler.HandleListAttachedGroupPolicies should have comment or be unexported (golint)
    • foulkon/http/handler.go
    • Line 16: warning: comment on exported const USER_ID should be of the form "USER_ID ..." (golint)
    • Line 18: warning: exported const GROUP_NAME should have comment (or a comment on this block) or be unexported (golint)
    • Line 24: warning: comment on exported const URI_PATH_PREFIX should be of the form "URI_PATH_PREFIX ..." (golint)
    • Line 27: warning: comment on exported const API_ROOT should be of the form "API_ROOT ..." (golint)
    • Line 31: warning: comment on exported const ORG_ROOT should be of the form "ORG_ROOT ..." (golint)
    • Line 34: warning: comment on exported const USER_ROOT_URL should be of the form "USER_ROOT_URL ..." (golint)
    • Line 39: warning: comment on exported const GROUP_ORG_ROOT_URL should be of the form "GROUP_ORG_ROOT_URL ..." (golint)
    • Line 47: warning: comment on exported const POLICY_ROOT_URL should be of the form "POLICY_ROOT_URL ..." (golint)
    • Line 52: warning: comment on exported const PROXY_RESOURCE_ROOT_URL should be of the form "PROXY_RESOURCE_ROOT_URL ..." (golint)
    • Line 56: warning: comment on exported const RESOURCE_URL should be of the form "RESOURCE_URL ..." (golint)
    • Line 59: warning: comment on exported const ADMIN_ROOT should be of the form "ADMIN_ROOT ..." (golint)
    • Line 62: warning: comment on exported const OIDC_AUTH_ROOT_URL should be of the form "OIDC_AUTH_ROOT_URL ..." (golint)
    • Line 66: warning: comment on exported const ABOUT should be of the form "ABOUT ..." (golint)
    • Line 72: warning: exported type ProxyHandler should have comment or be unexported (golint)
    • Line 79: warning: exported type WorkerHandler should have comment or be unexported (golint)
    • foulkon/api/group.go
    • Line 29: warning: exported method Group.GetUrn should have comment or be unexported (golint)
    • Line 33: warning: comment on exported type GroupIdentity should be of the form "GroupIdentity ..." (with optional leading article) (golint)
    • Line 39: warning: exported type GroupMembers should have comment or be unexported (golint)
    • Line 44: warning: exported type GroupPolicies should have comment or be unexported (golint)
    • Line 51: warning: exported method WorkerAPI.AddGroup should have comment or be unexported (golint)
    • Line 126: warning: exported method WorkerAPI.GetGroupByName should have comment or be unexported (golint)
    • Line 181: warning: exported method WorkerAPI.ListGroups should have comment or be unexported (golint)
    • Line 227: warning: exported method WorkerAPI.UpdateGroup should have comment or be unexported (golint)
    • Line 323: warning: exported method WorkerAPI.RemoveGroup should have comment or be unexported (golint)
    • Line 359: warning: exported method WorkerAPI.AddMember should have comment or be unexported (golint)
    • Line 420: warning: exported method WorkerAPI.RemoveMember should have comment or be unexported (golint)
    • Line 482: warning: exported method WorkerAPI.ListMembers should have comment or be unexported (golint)
    • Line 537: warning: exported method WorkerAPI.AttachPolicyToGroup should have comment or be unexported (golint)
    • Line 597: warning: exported method WorkerAPI.DetachPolicyToGroup should have comment or be unexported (golint)
    • Line 658: warning: exported method WorkerAPI.ListAttachedGroupPolicies should have comment or be unexported (golint)
    • foulkon/api/logger.go
    • Line 18: warning: comment on exported function LogOperationWarn should be of the form "LogOperationWarn ..." (golint)
    • Line 24: warning: comment on exported function LogOperationError should be of the form "LogOperationError ..." (golint)
    • Line 48: warning: comment on exported function TransactionProxyErrorLogWithStatus should be of the form "TransactionProxyErrorLogWithStatus ..." (golint)
    • foulkon/api/manager.go
    • Line 194: warning: comment on exported type ProxyResourcesAPI should be of the form "ProxyResourcesAPI ..." (with optional leading article) (golint)
    • foulkon/foulkon/worker.go
    • Line 30: warning: exported const FOULKON_VERSION should have comment (or a comment on this block) or be unexported (golint)
    • Line 63: warning: comment on exported type WorkerConfig should be of the form "WorkerConfig ..." (with optional leading article) (golint)
    • Line 272: warning: exported function CloseWorker should have comment or be unexported (golint)
    • foulkon/database/postgresql/auth_oidc.go
    • Line 15: warning: exported method PostgresRepo.AddOidcProvider should have comment or be unexported (golint)
    • Line 64: warning: exported method PostgresRepo.GetOidcProviderByName should have comment or be unexported (golint)
    • Line 102: warning: exported method PostgresRepo.GetOidcProvidersFiltered should have comment or be unexported (golint)
    • Line 152: warning: exported method PostgresRepo.UpdateOidcProvider should have comment or be unexported (golint)
    • Line 204: warning: exported method PostgresRepo.RemoveOidcProvider should have comment or be unexported (golint)
    • foulkon/http/about.go
    • Line 12: warning: exported type LoggerConfig should have comment or be unexported (golint)
    • Line 18: warning: exported type DatabaseConfig should have comment or be unexported (golint)
    • Line 25: warning: exported type AuthConnectorConfig should have comment or be unexported (golint)
    • Line 30: warning: exported type Config should have comment or be unexported (golint)
    • Line 39: warning: exported method WorkerHandler.HandleGetCurrentConfig should have comment or be unexported (golint)
    • foulkon/api/policy.go
    • Line 30: warning: exported method Policy.GetUrn should have comment or be unexported (golint)
    • Line 34: warning: comment on exported type PolicyIdentity should be of the form "PolicyIdentity ..." (with optional leading article) (golint)
    • Line 40: warning: exported type Statement should have comment or be unexported (golint)
    • Line 46: warning: exported type PolicyGroups should have comment or be unexported (golint)
    • Line 57: warning: exported method WorkerAPI.AddPolicy should have comment or be unexported (golint)
    • Line 142: warning: exported method WorkerAPI.GetPolicyByName should have comment or be unexported (golint)
    • Line 195: warning: exported method WorkerAPI.ListPolicies should have comment or be unexported (golint)
    • Line 240: warning: exported method WorkerAPI.UpdatePolicy should have comment or be unexported (golint)
    • Line 347: warning: exported method WorkerAPI.RemovePolicy should have comment or be unexported (golint)
    • Line 382: warning: exported method WorkerAPI.ListAttachedGroups should have comment or be unexported (golint)
    • foulkon/api/user.go
    • Line 23: warning: exported type UserGroups should have comment or be unexported (golint)
    • Line 34: warning: exported method User.GetUrn should have comment or be unexported (golint)
    • Line 40: warning: exported method WorkerAPI.AddUser should have comment or be unexported (golint)
    • Line 107: warning: exported method WorkerAPI.GetUserByExternalID should have comment or be unexported (golint)
    • Line 151: warning: exported method WorkerAPI.ListUsers should have comment or be unexported (golint)
    • Line 189: warning: exported method WorkerAPI.UpdateUser should have comment or be unexported (golint)
    • Line 259: warning: exported method WorkerAPI.RemoveUser should have comment or be unexported (golint)
    • Line 294: warning: exported method WorkerAPI.ListGroupsByUser should have comment or be unexported (golint)
    • foulkon/middleware/xrequestid/xrequestid.go
    • Line 10: warning: comment on exported type XRequestIdMiddleware should be of the form "XRequestIdMiddleware ..." (with optional leading article) (golint)
    • Line 18: warning: exported method XRequestIdMiddleware.Action should have comment or be unexported (golint)
    • Line 27: warning: exported method XRequestIdMiddleware.GetInfo should have comment or be unexported (golint)
    • Line 27: warning: receiver name rm should be consistent with previous receiver name r for XRequestIdMiddleware (golint)
    • foulkon/middleware/logger/logger.go
    • Line 10: warning: comment on exported type RequestLoggerMiddleware should be of the form "RequestLoggerMiddleware ..." (with optional leading article) (golint)
    • Line 18: warning: comment on exported method RequestLoggerMiddleware.Action should be of the form "Action ..." (golint)
    • Line 26: warning: exported method RequestLoggerMiddleware.GetInfo should have comment or be unexported (golint)
    • foulkon/database/postgresql/proxy.go
    • Line 14: warning: exported method PostgresRepo.GetProxyResourceByName should have comment or be unexported (golint)
    • Line 36: warning: exported method PostgresRepo.GetProxyResources should have comment or be unexported (golint)
    • Line 71: warning: exported method PostgresRepo.AddProxyResource should have comment or be unexported (golint)
    • Line 102: warning: exported method PostgresRepo.UpdateProxyResource should have comment or be unexported (golint)
    • Line 132: warning: exported method PostgresRepo.RemoveProxyResource should have comment or be unexported (golint)
    • foulkon/api/auth_oidc.go
    • Line 14: warning: comment on exported type OidcProvider should be of the form "OidcProvider ..." (with optional leading article) (golint)
    • Line 26: warning: exported type OidcClient should have comment or be unexported (golint)
    • Line 40: warning: exported method OidcProvider.GetUrn should have comment or be unexported (golint)
    • Line 46: warning: exported method WorkerAPI.AddOidcProvider should have comment or be unexported (golint)
    • Line 131: warning: exported method WorkerAPI.GetOidcProviderByName should have comment or be unexported (golint)
    • Line 177: warning: exported method WorkerAPI.ListOidcProviders should have comment or be unexported (golint)
    • Line 219: warning: exported method WorkerAPI.UpdateOidcProvider should have comment or be unexported (golint)
    • Line 341: warning: exported method WorkerAPI.RemoveOidcProvider should have comment or be unexported (golint)
    • foulkon/foulkon/proxy.go
    • Line 45: warning: exported function NewProxy should have comment or be unexported (golint)
    • Line 155: warning: exported function CloseProxy should have comment or be unexported (golint)
    • foulkon/middleware/auth/connector.go
    • Line 10: warning: comment on exported type AuthenticatorMiddleware should be of the form "AuthenticatorMiddleware ..." (with optional leading article) (golint)
    • Line 17: warning: comment on exported function NewAuthenticatorMiddleware should be of the form "NewAuthenticatorMiddleware ..." (golint)
    • Line 26: warning: comment on exported type AuthConnector should be of the form "AuthConnector ..." (with optional leading article) (golint)
    • Line 32: warning: exported method AuthenticatorMiddleware.Action should have comment or be unexported (golint)
    • Line 60: warning: exported method AuthenticatorMiddleware.GetInfo should have comment or be unexported (golint)
    • foulkon/http/auth_oidc.go
    • Line 11: warning: exported type CreateOidcProviderRequest should have comment or be unexported (golint)
    • Line 18: warning: exported type UpdateOidcProviderRequest should have comment or be unexported (golint)
    • Line 27: warning: exported type ListOidcProvidersResponse should have comment or be unexported (golint)
    • Line 36: warning: exported method WorkerHandler.HandleAddOidcProvider should have comment or be unexported (golint)
    • Line 50: warning: exported method WorkerHandler.HandleGetOidcProviderByName should have comment or be unexported (golint)
    • Line 63: warning: exported method WorkerHandler.HandleListOidcProviders should have comment or be unexported (golint)
    • Line 83: warning: exported method WorkerHandler.HandleUpdateOidcProvider should have comment or be unexported (golint)
    • Line 98: warning: exported method WorkerHandler.HandleRemoveOidcProvider should have comment or be unexported (golint)
    • foulkon/api/util.go
    • Line 10: warning: comment on exported const RESOURCE_GROUP should be of the form "RESOURCE_GROUP ..." (golint)
    • Line 12: warning: exported const RESOURCE_USER should have comment (or a comment on this block) or be unexported (golint)
    • Line 17: warning: comment on exported const RESOURCE_EXTERNAL should be of the form "RESOURCE_EXTERNAL ..." (golint)
    • Line 21: warning: comment on exported const MAX_EXTERNAL_ID_LENGTH should be of the form "MAX_EXTERNAL_ID_LENGTH ..." (golint)
    • Line 32: warning: comment on exported const USER_ACTION_CREATE_USER should be of the form "USER_ACTION_CREATE_USER ..." (golint)
    • Line 40: warning: comment on exported const GROUP_ACTION_CREATE_GROUP should be of the form "GROUP_ACTION_CREATE_GROUP ..." (golint)
    • Line 53: warning: comment on exported const POLICY_ACTION_CREATE_POLICY should be of the form "POLICY_ACTION_CREATE_POLICY ..." (golint)
    • Line 61: warning: comment on exported const PROXY_ACTION_CREATE_RESOURCE should be of the form "PROXY_ACTION_CREATE_RESOURCE ..." (golint)
    • Line 68: warning: comment on exported const AUTH_OIDC_ACTION_CREATE_PROVIDER should be of the form "AUTH_OIDC_ACTION_CREATE_PROVIDER ..." (golint)
    • Line 94: warning: exported function CreateUrn should have comment or be unexported (golint)
    • Line 105: warning: exported function GetUrnPrefix should have comment or be unexported (golint)
    • Line 116: warning: exported function IsValidUserExternalID should have comment or be unexported (golint)
    • Line 120: warning: exported function IsValidOrg should have comment or be unexported (golint)
    • Line 134: warning: exported function IsValidPath should have comment or be unexported (golint)
    • Line 138: warning: exported function IsValidEffect should have comment or be unexported (golint)
    • Line 148: warning: exported function IsValidProxyResource should have comment or be unexported (golint)
    • Line 177: warning: exported function AreValidActions should have comment or be unexported (golint)
    • Line 187: warning: exported function AreValidResources should have comment or be unexported (golint)
    • Line 255: warning: exported function AreValidStatements should have comment or be unexported (golint)
    • Line 289: warning: exported function AreValidOidcClientNames should have comment or be unexported (golint)
    • Line 354: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • foulkon/database/postgresql/group.go
    • Line 13: warning: exported method PostgresRepo.AddGroup should have comment or be unexported (golint)
    • Line 39: warning: exported method PostgresRepo.GetGroupByName should have comment or be unexported (golint)
    • Line 62: warning: exported method PostgresRepo.GetGroupById should have comment or be unexported (golint)
    • Line 85: warning: exported method PostgresRepo.GetGroupsFiltered should have comment or be unexported (golint)
    • Line 121: warning: exported method PostgresRepo.UpdateGroup should have comment or be unexported (golint)
    • Line 154: warning: exported method PostgresRepo.RemoveGroup should have comment or be unexported (golint)
    • Line 191: warning: exported method PostgresRepo.AddMember should have comment or be unexported (golint)
    • Line 213: warning: exported method PostgresRepo.RemoveMember should have comment or be unexported (golint)
    • Line 226: warning: exported method PostgresRepo.IsMemberOfGroup should have comment or be unexported (golint)
    • Line 246: warning: exported method PostgresRepo.GetGroupMembers should have comment or be unexported (golint)
    • Line 288: warning: exported method PostgresRepo.AttachPolicy should have comment or be unexported (golint)
    • Line 310: warning: exported method PostgresRepo.DetachPolicy should have comment or be unexported (golint)
    • Line 325: warning: exported method PostgresRepo.IsAttachedToGroup should have comment or be unexported (golint)
    • Line 345: warning: exported method PostgresRepo.GetAttachedPolicies should have comment or be unexported (golint)
    • foulkon/api/authz.go
    • Line 13: warning: exported type RequestInfo should have comment or be unexported (golint)
    • Line 19: warning: exported type EffectRestriction should have comment or be unexported (golint)
    • Line 24: warning: exported type Restrictions should have comment or be unexported (golint)
    • Line 31: warning: exported type ExternalResource should have comment or be unexported (golint)
    • Line 35: warning: exported method ExternalResource.GetUrn should have comment or be unexported (golint)
    • foulkon/api/proxy.go
    • Line 27: warning: comment on exported type ProxyResourceIdentity should be of the form "ProxyResourceIdentity ..." (with optional leading article) (golint)
    • Line 33: warning: exported type ResourceEntity should have comment or be unexported (golint)
    • Line 41: warning: exported method ProxyResource.GetUrn should have comment or be unexported (golint)
    • Line 62: warning: exported method WorkerAPI.AddProxyResource should have comment or be unexported (golint)
    • Line 168: warning: exported method WorkerAPI.GetProxyResourceByName should have comment or be unexported (golint)
    • Line 223: warning: exported method WorkerAPI.UpdateProxyResource should have comment or be unexported (golint)
    • Line 358: warning: exported method WorkerAPI.RemoveProxyResource should have comment or be unexported (golint)
    • Line 394: warning: exported method WorkerAPI.ListProxyResources should have comment or be unexported (golint)
    • foulkon/middleware/middleware.go
    • Line 6: warning: comment on exported const REQUEST_ID_HEADER should be of the form "REQUEST_ID_HEADER ..." (golint)
    • Line 8: warning: exported const USER_ID_HEADER should have comment (or a comment on this block) or be unexported (golint)
    • Line 10: warning: comment on exported const AUTHENTICATOR_MIDDLEWARE should be of the form "AUTHENTICATOR_MIDDLEWARE ..." (golint)
    • foulkon/database/postgresql/postgres_db.go
    • Line 13: warning: exported type PostgresRepo should have comment or be unexported (golint)
    • Line 17: warning: exported function InitDb should have comment or be unexported (golint)
    • Line 67: warning: comment on exported method User.TableName should be of the form "TableName ..." (golint)
    • Line 83: warning: comment on exported method Group.TableName should be of the form "TableName ..." (golint)
    • Line 99: warning: comment on exported method Policy.TableName should be of the form "TableName ..." (golint)
    • Line 113: warning: comment on exported method Statement.TableName should be of the form "TableName ..." (golint)
    • Line 118: warning: comment on exported type GroupUserRelation should be of the form "GroupUserRelation ..." (with optional leading article) (golint)
    • Line 125: warning: comment on exported method GroupUserRelation.TableName should be of the form "TableName ..." (golint)
    • Line 130: warning: comment on exported type GroupPolicyRelation should be of the form "GroupPolicyRelation ..." (with optional leading article) (golint)
    • Line 137: warning: comment on exported method GroupPolicyRelation.TableName should be of the form "TableName ..." (golint)
    • Line 142: warning: exported method PostgresRepo.OrderByValidColumns should have comment or be unexported (golint)
    • Line 184: warning: comment on exported method ProxyResource.TableName should be of the form "TableName ..." (golint)
    • Line 189: warning: comment on exported type OidcProvider should be of the form "OidcProvider ..." (with optional leading article) (golint)
    • Line 200: warning: comment on exported method OidcProvider.TableName should be of the form "TableName ..." (golint)
    • Line 205: warning: comment on exported type OidcClient should be of the form "OidcClient ..." (with optional leading article) (golint)
    • Line 212: warning: comment on exported method OidcClient.TableName should be of the form "TableName ..." (golint)
    • foulkon/http/authz.go
    • Line 11: warning: exported type AuthorizeResourcesRequest should have comment or be unexported (golint)
    • Line 18: warning: exported type AuthorizeResourcesResponse should have comment or be unexported (golint)
    • Line 24: warning: exported method WorkerHandler.HandleGetAuthorizedExternalResources should have comment or be unexported (golint)
    • foulkon/database/postgresql/policy.go
    • Line 15: warning: exported method PostgresRepo.AddPolicy should have comment or be unexported (golint)
    • Line 66: warning: exported method PostgresRepo.GetPolicyByName should have comment or be unexported (golint)
    • Line 104: warning: exported method PostgresRepo.GetPolicyById should have comment or be unexported (golint)
    • Line 142: warning: exported method PostgresRepo.GetPoliciesFiltered should have comment or be unexported (golint)
    • Line 195: warning: exported method PostgresRepo.UpdatePolicy should have comment or be unexported (golint)
    • Line 250: warning: exported method PostgresRepo.RemovePolicy should have comment or be unexported (golint)
    • Line 286: warning: exported method PostgresRepo.GetAttachedGroups should have comment or be unexported (golint)
    • foulkon/http/user.go
    • Line 12: warning: exported type CreateUserRequest should have comment or be unexported (golint)
    • Line 17: warning: exported type UpdateUserRequest should have comment or be unexported (golint)
    • Line 23: warning: exported type GetUserExternalIDsResponse should have comment or be unexported (golint)
    • Line 30: warning: exported type GetGroupsByUserIdResponse should have comment or be unexported (golint)
    • Line 39: warning: exported method WorkerHandler.HandleAddUser should have comment or be unexported (golint)
    • Line 53: warning: exported method WorkerHandler.HandleGetUserByExternalID should have comment or be unexported (golint)
    • Line 66: warning: exported method WorkerHandler.HandleListUsers should have comment or be unexported (golint)
    • Line 86: warning: exported method WorkerHandler.HandleUpdateUser should have comment or be unexported (golint)
    • Line 100: warning: exported method WorkerHandler.HandleRemoveUser should have comment or be unexported (golint)
    • Line 113: warning: exported method WorkerHandler.HandleListGroupsByUser should have comment or be unexported (golint)
    • foulkon/api/error.go
    • Line 6: warning: comment on exported const UNKNOWN_API_ERROR should be of the form "UNKNOWN_API_ERROR ..." (golint)
    • Line 8: warning: exported const INVALID_PARAMETER_ERROR should have comment (or a comment on this block) or be unexported (golint)
    • Line 11: warning: comment on exported const AUTHENTICATION_API_ERROR should be of the form "AUTHENTICATION_API_ERROR ..." (golint)
    • Line 14: warning: comment on exported const USER_BY_EXTERNAL_ID_NOT_FOUND should be of the form "USER_BY_EXTERNAL_ID_NOT_FOUND ..." (golint)
    • Line 18: warning: comment on exported const GROUP_BY_ORG_AND_NAME_NOT_FOUND should be of the form "GROUP_BY_ORG_AND_NAME_NOT_FOUND ..." (golint)
    • Line 22: warning: comment on exported const USER_IS_ALREADY_A_MEMBER_OF_GROUP should be of the form "USER_IS_ALREADY_A_MEMBER_OF_GROUP ..." (golint)
    • Line 26: warning: comment on exported const POLICY_IS_ALREADY_ATTACHED_TO_GROUP should be of the form "POLICY_IS_ALREADY_ATTACHED_TO_GROUP ..." (golint)
    • Line 30: warning: comment on exported const POLICY_ALREADY_EXIST should be of the form "POLICY_ALREADY_EXIST ..." (golint)
    • Line 34: warning: comment on exported const PROXY_RESOURCE_ALREADY_EXIST should be of the form "PROXY_RESOURCE_ALREADY_EXIST ..." (golint)
    • Line 39: warning: comment on exported const AUTH_OIDC_PROVIDER_ALREADY_EXIST should be of the form "AUTH_OIDC_PROVIDER_ALREADY_EXIST ..." (golint)
    • Line 43: warning: comment on exported const REGEX_NO_MATCH should be of the form "REGEX_NO_MATCH ..." (golint)
    • Line 47: warning: exported type Error should have comment or be unexported (golint)

ineffassign98%

IneffAssign detects ineffectual assignments in Go code.


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!