Preparing report...

Report for github.com/infraboard/keyauth

A+    Excellent!    Found 38 issues across 228 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!


gocyclo97%

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.


golint91%

Golint is a linter for Go source code.

    • keyauth/pkg/mconf/request_ext.go
    • Line 27: warning: exported method CreateGroupRequest.Validate should have comment or be unexported (golint)
    • Line 31: warning: exported method DescribeGroupRequest.Validate should have comment or be unexported (golint)
    • Line 35: warning: exported method DeleteGroupRequest.Validate should have comment or be unexported (golint)
    • Line 39: warning: exported function NewDescribeGroupRequestWithName should have comment or be unexported (golint)
    • Line 43: warning: exported function NewDeleteGroupRequestWithName should have comment or be unexported (golint)
    • keyauth/pkg/mconf/conf_ext.go
    • Line 9: warning: comment on exported function NewGroup should be of the form "NewGroup ..." (golint)
    • Line 25: warning: comment on exported function NewGroupSet should be of the form "NewGroupSet ..." (golint)
    • Line 37: warning: exported function NewItem should have comment or be unexported (golint)
    • Line 49: warning: exported function NewGroupItemSet should have comment or be unexported (golint)
    • Line 59: warning: comment on exported function NewItemSet should be of the form "NewItemSet ..." (golint)
    • Line 71: warning: exported method ItemSet.Docs should have comment or be unexported (golint)
    • keyauth/pkg/tag/request_ext.go
    • Line 17: warning: exported method CreateTagRequest.Validate should have comment or be unexported (golint)
    • Line 21: warning: exported method CreateTagRequest.GenUUID should have comment or be unexported (golint)
    • Line 34: warning: exported method QueryTagKeyRequest.Validate should have comment or be unexported (golint)
    • Line 38: warning: exported method QueryTagValueRequest.Validate should have comment or be unexported (golint)
    • Line 42: warning: exported method DescribeTagRequest.Validate should have comment or be unexported (golint)
    • Line 53: warning: comment on exported function NewQueryTagKeyRequest should be of the form "NewQueryTagKeyRequest ..." (golint)
    • keyauth/pkg/grpc_context.go
    • Line 75: warning: comment on exported method GrpcInCtx.GetUserAgent should be of the form "GetUserAgent ..." (golint)
    • Line 80: warning: comment on exported method GrpcInCtx.GetRemoteIP should be of the form "GetRemoteIP ..." (golint)
    • Line 85: warning: comment on exported method GrpcInCtx.GetRequestID should be of the form "GetRequestID ..." (golint)
    • Line 224: warning: comment on exported function NewGrpcInCtxFromHTTPRequest should be of the form "NewGrpcInCtxFromHTTPRequest ..." (golint)
    • Line 254: warning: exported function GetClientCredentialsFromHTTPRequest should have comment or be unexported (golint)
    • keyauth/pkg/role/request_ext.go
    • Line 76: warning: exported method AddPermissionToRoleRequest.Validate should have comment or be unexported (golint)
    • Line 80: warning: exported method AddPermissionToRoleRequest.Length should have comment or be unexported (golint)
    • Line 91: warning: exported method RemovePermissionFromRoleRequest.Validate should have comment or be unexported (golint)
    • Line 110: warning: exported function NewDescribePermissionRequestWithID should have comment or be unexported (golint)
    • Line 114: warning: exported method DescribePermissionRequest.Validate should have comment or be unexported (golint)
    • Line 121: warning: exported function NewUpdatePermissionRequest should have comment or be unexported (golint)
    • Line 125: warning: exported method UpdatePermissionRequest.Validate should have comment or be unexported (golint)
    • keyauth/pkg/token/request.ext.go
    • Line 63: warning: comment on exported function NewQueryTokenRequestFromHTTP should be of the form "NewQueryTokenRequestFromHTTP ..." (golint)
    • Line 159: warning: exported method IssueTokenRequest.IsLoginRequest should have comment or be unexported (golint)
    • Line 219: warning: exported function NewDeleteTokenRequest should have comment or be unexported (golint)
    • Line 223: warning: exported method DeleteTokenRequest.Validate should have comment or be unexported (golint)
    • Line 231: warning: exported function NewDeleteTokenResponse should have comment or be unexported (golint)
    • keyauth/pkg/user/user_ext.go
    • Line 76: warning: exported method User.UnBlock should have comment or be unexported (golint)
    • Line 250: warning: exported method UpdateAccountRequest.CheckOwner should have comment or be unexported (golint)
    • keyauth/pkg/provider/auth/dingtalk/auth.go
    • Line 24: warning: exported type Response should have comment or be unexported (golint)
    • Line 30: warning: exported type UserInfo should have comment or be unexported (golint)
    • Line 36: warning: exported type Dingtalk should have comment or be unexported (golint)
    • Line 61: warning: comment on exported method Dingtalk.CodeAuth should be of the form "CodeAuth ..." (golint)
    • keyauth/pkg/tag/tag_ext.go
    • Line 68: warning: exported function NewDefaultTagKey should have comment or be unexported (golint)
    • Line 84: warning: exported function NewDefaultTagValue should have comment or be unexported (golint)
    • keyauth/pkg/grpc_auther.go
    • Line 33: warning: comment on exported type OwnerChecker should be of the form "OwnerChecker ..." (with optional leading article) (golint)
    • keyauth/pkg/role/role_ext.go
    • Line 64: warning: exported function NewDeaultPermission should have comment or be unexported (golint)
    • Line 68: warning: exported function NewPermission should have comment or be unexported (golint)
    • Line 87: warning: exported function PermissionHash should have comment or be unexported (golint)
    • Line 175: warning: exported method Set.RoleNames should have comment or be unexported (golint)
    • Line 271: warning: exported method QueryPermissionRequest.Validate should have comment or be unexported (golint)
    • keyauth/pkg/user/request_ext.go
    • Line 121: warning: comment on exported method UpdatePasswordRequest.CheckOwner should be of the form "CheckOwner ..." (golint)
    • Line 146: warning: exported method BlockAccountRequest.Validate should have comment or be unexported (golint)
    • Line 154: warning: exported method UnBlockAccountRequest.Validate should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign99%

IneffAssign detects ineffectual assignments in Go code.


misspell90%

Misspell Finds commonly misspelled English words

    • keyauth/cmd/init.go
    • Line 260: warning: "applicaton" is a misspelling of "application" (misspell)
    • Line 271: warning: "applicaton" is a misspelling of "application" (misspell)
    • keyauth/pkg/role/role_ext.go
    • Line 31: warning: "Creater" is a misspelling of "Creature" (misspell)
    • Line 68: warning: "creater" is a misspelling of "creature" (misspell)
    • Line 75: warning: "Creater" is a misspelling of "Creature" (misspell)
    • Line 75: warning: "creater" is a misspelling of "creature" (misspell)
    • Line 195: warning: "permisson" is a misspelling of "permission" (misspell)
    • keyauth/pkg/provider/ldap.go
    • Line 29: warning: "Creater" is a misspelling of "Creature" (misspell)
    • Line 47: warning: "Creater" is a misspelling of "Creature" (misspell)
    • Line 47: warning: "creater" is a misspelling of "creature" (misspell)
    • Line 47: warning: "creater" is a misspelling of "creature" (misspell)
    • keyauth/pkg/mconf/conf_ext.go
    • Line 37: warning: "creater" is a misspelling of "creature" (misspell)
    • Line 42: warning: "Creater" is a misspelling of "Creature" (misspell)
    • Line 42: warning: "creater" is a misspelling of "creature" (misspell)
    • Line 49: warning: "creater" is a misspelling of "creature" (misspell)
    • Line 52: warning: "creater" is a misspelling of "creature" (misspell)