Preparing report...

Report for github.com/golang-tire/auth

A+    Excellent!    Found 33 issues across 54 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!


golint40%

Golint is a linter for Go source code.

    • auth/internal/pkg/pubsub/pubsub.go
    • Line 22: warning: exported type PubSub should have comment or be unexported (golint)
    • Line 33: warning: exported function Init should have comment or be unexported (golint)
    • Line 72: warning: exported method PubSub.AddHandler should have comment or be unexported (golint)
    • Line 82: warning: exported method PubSub.Run should have comment or be unexported (golint)
    • Line 89: warning: exported function Get should have comment or be unexported (golint)
    • Line 93: warning: exported method PubSub.Publish should have comment or be unexported (golint)
    • auth/internal/entity/apps.go
    • Line 9: warning: exported type App should have comment or be unexported (golint)
    • Line 16: warning: exported type Resource should have comment or be unexported (golint)
    • Line 24: warning: exported type Object should have comment or be unexported (golint)
    • Line 32: warning: exported method App.ToProto should have comment or be unexported (golint)
    • Line 46: warning: exported function AppToProtoList should have comment or be unexported (golint)
    • Line 54: warning: exported method Resource.ToProto should have comment or be unexported (golint)
    • Line 68: warning: exported function ResourceToProtoList should have comment or be unexported (golint)
    • Line 76: warning: exported method Object.ToProto should have comment or be unexported (golint)
    • Line 90: warning: exported function ObjectToProtoList should have comment or be unexported (golint)
    • auth/internal/entity/audit_logs.go
    • Line 9: warning: exported type AuditLog should have comment or be unexported (golint)
    • Line 20: warning: exported method AuditLog.ToProto should have comment or be unexported (golint)
    • Line 37: warning: exported function AuditLogToProtoList should have comment or be unexported (golint)
    • auth/internal/entity/rules.go
    • Line 14: warning: exported type Rule should have comment or be unexported (golint)
    • Line 27: warning: exported method Rule.AfterCreate should have comment or be unexported (golint)
    • Line 40: warning: exported method Rule.AfterUpdate should have comment or be unexported (golint)
    • Line 53: warning: exported method Rule.AfterDelete should have comment or be unexported (golint)
    • Line 57: warning: exported method Rule.ToProto should have comment or be unexported (golint)
    • Line 80: warning: exported method Rule.Bytes should have comment or be unexported (golint)
    • Line 88: warning: exported function RuleToProtoList should have comment or be unexported (golint)
    • auth/internal/entity/roles.go
    • Line 10: warning: exported type Role should have comment or be unexported (golint)
    • Line 17: warning: exported method Role.ToProto should have comment or be unexported (golint)
    • Line 31: warning: exported function RoleToProtoList should have comment or be unexported (golint)
    • auth/internal/auth/rbac.go
    • Line 57: warning: exported type Policy should have comment or be unexported (golint)
    • Line 66: warning: exported type Group should have comment or be unexported (golint)
    • Line 182: warning: exported function InitRbac should have comment or be unexported (golint)
    • auth/internal/entity/domains.go
    • Line 10: warning: exported type Domain should have comment or be unexported (golint)
    • Line 17: warning: exported method Domain.ToProto should have comment or be unexported (golint)
    • Line 31: warning: exported function DomainToProtoList should have comment or be unexported (golint)
    • auth/internal/audit_logs/api.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 17: warning: exported type API should have comment or be unexported (golint)
    • Line 52: warning: exported function New should have comment or be unexported (golint)
    • auth/internal/rules/repository_mock.go
    • Line 25: warning: exported method MockRepository.Get should have comment or be unexported (golint)
    • Line 34: warning: exported method MockRepository.Count should have comment or be unexported (golint)
    • Line 38: warning: exported method MockRepository.Query should have comment or be unexported (golint)
    • Line 42: warning: exported method MockRepository.Create should have comment or be unexported (golint)
    • Line 52: warning: exported method MockRepository.Update should have comment or be unexported (golint)
    • Line 65: warning: exported method MockRepository.Delete should have comment or be unexported (golint)
    • Line 76: warning: exported method MockRepository.All should have comment or be unexported (golint)
    • auth/internal/entity/users.go
    • Line 9: warning: exported type User should have comment or be unexported (golint)
    • Line 42: warning: exported method User.AfterDelete should have comment or be unexported (golint)
    • Line 46: warning: exported type UserRole should have comment or be unexported (golint)
    • Line 58: warning: exported method User.ToProto should have comment or be unexported (golint)
    • Line 85: warning: exported function UserToProtoList should have comment or be unexported (golint)
    • Line 93: warning: exported method UserRole.ToProto should have comment or be unexported (golint)
    • Line 107: warning: exported function UserRoleToProtoList should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign94%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!