Preparing report...

Report for github.com/tribehq/platform

A    Great!    Found 124 issues across 276 files

Tweet

gofmt72%

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!


gocyclo99%

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.


golint77%

Golint is a linter for Go source code.

    • platform/controllers/shop/account.go
    • Line 14: warning: exported function GetAccountPage should have comment or be unexported (golint)
    • Line 18: warning: exported function AccountLogin should have comment or be unexported (golint)
    • Line 22: warning: exported function AccountLogout should have comment or be unexported (golint)
    • Line 36: warning: exported function GetAccountAddresses should have comment or be unexported (golint)
    • Line 40: warning: exported function GetAccountLoginPage should have comment or be unexported (golint)
    • Line 44: warning: exported function GetAccountOrders should have comment or be unexported (golint)
    • platform/controllers/oauth2/config/config.go
    • Line 8: warning: exported const AccessTokenLifetime should have comment (or a comment on this block) or be unexported (golint)
    • Line 12: warning: comment on exported const SessionCookieSecret should be of the form "SessionCookieSecret ..." (golint)
    • Line 15: warning: comment on exported const SessionCookieMaxAge should be of the form "SessionCookieMaxAge ..." (golint)
    • Line 19: warning: comment on exported const SessionCookieHTTPOnly should be of the form "SessionCookieHTTPOnly ..." (golint)
    • platform/models/blog.go
    • Line 15: warning: exported type Blog should have comment or be unexported (golint)
    • Line 18: warning: exported type BlogPost should have comment or be unexported (golint)
    • Line 21: warning: exported function GetBlogPosts should have comment or be unexported (golint)
    • platform/models/user.go
    • Line 249: warning: comment on exported function GetUserRoleGroupsByUserID should be of the form "GetUserRoleGroupsByUserID ..." (golint)
    • Line 260: warning: exported function GetMergedUserRoles should have comment or be unexported (golint)
    • Line 270: warning: exported function GetMergedUserPermissions should have comment or be unexported (golint)
    • Line 561: warning: exported function GetUserRoleGroups should have comment or be unexported (golint)
    • Line 721: warning: exported function GetUserRolePermissionsByFilter should have comment or be unexported (golint)
    • Line 735: warning: exported function GetUserRolePermissions should have comment or be unexported (golint)
    • platform/controllers/oauth2/web/middleware.go
    • Line 20: warning: comment on exported function NewGuestMiddleware should be of the form "NewGuestMiddleware ..." (golint)
    • Line 46: warning: comment on exported function NewLoggedInMiddleware should be of the form "NewLoggedInMiddleware ..." (golint)
    • Line 139: warning: comment on exported function NewClientMiddleware should be of the form "NewClientMiddleware ..." (golint)
    • platform/models/scalars.go
    • Line 17: warning: comment on exported function MarshalID should be of the form "MarshalID ..." (golint)
    • Line 27: warning: comment on exported function UnmarshalID should be of the form "UnmarshalID ..." (golint)
    • Line 36: warning: exported function MarshalTimestamp should have comment or be unexported (golint)
    • Line 45: warning: exported function UnmarshalTimestamp should have comment or be unexported (golint)
    • platform/models/subscription.go
    • Line 22: warning: comment on exported type SubscriptionPlanInterval should be of the form "SubscriptionPlanInterval ..." (with optional leading article) (golint)
    • Line 33: warning: comment on exported type SubscriptionPlanBillingScheme should be of the form "SubscriptionPlanBillingScheme ..." (with optional leading article) (golint)
    • Line 42: warning: comment on exported type SubscriptionPlanUsageType should be of the form "SubscriptionPlanUsageType ..." (with optional leading article) (golint)
    • Line 51: warning: comment on exported type SubscriptionPlanTiersMode should be of the form "SubscriptionPlanTiersMode ..." (with optional leading article) (golint)
    • Line 60: warning: comment on exported type SubscriptionPlanTransformUsageRound should be of the form "SubscriptionPlanTransformUsageRound ..." (with optional leading article) (golint)
    • Line 69: warning: comment on exported type SubscriptionPlanAggregateUsage should be of the form "SubscriptionPlanAggregateUsage ..." (with optional leading article) (golint)
    • Line 80: warning: comment on exported type SubscriptionPlanTier should be of the form "SubscriptionPlanTier ..." (with optional leading article) (golint)
    • Line 87: warning: exported type SubscriptionPlan should have comment or be unexported (golint)
    • Line 167: warning: exported type Discount should have comment or be unexported (golint)
    • Line 200: warning: exported type Subscription should have comment or be unexported (golint)
    • platform/models/user_audit_log.go
    • Line 32: warning: exported type ActionType should have comment or be unexported (golint)
    • Line 35: warning: exported const Created should have comment (or a comment on this block) or be unexported (golint)
    • platform/resolvers/base_resolver.go
    • Line 6: warning: comment on exported type BookingResolver should be of the form "BookingResolver ..." (with optional leading article) (golint)
    • Line 9: warning: comment on exported method Resolver.Cart should be of the form "Cart ..." (golint)
    • Line 14: warning: comment on exported method Resolver.Job should be of the form "Job ..." (golint)
    • Line 19: warning: comment on exported method Resolver.CartItem should be of the form "CartItem ..." (golint)
    • Line 24: warning: comment on exported method Resolver.Product should be of the form "Product ..." (golint)
    • Line 29: warning: comment on exported method Resolver.ProductReview should be of the form "ProductReview ..." (golint)
    • Line 39: warning: comment on exported method Resolver.Service should be of the form "Service ..." (golint)
    • Line 44: warning: comment on exported method Resolver.Store should be of the form "Store ..." (golint)
    • platform/controllers/shop/sitemap.go
    • Line 12: warning: exported function RootSiteMap should have comment or be unexported (golint)
    • Line 16: warning: exported function ProductsSiteMap should have comment or be unexported (golint)
    • Line 20: warning: exported function ProductCollectionsSiteMap should have comment or be unexported (golint)
    • Line 24: warning: exported function BlogSiteMap should have comment or be unexported (golint)
    • Line 28: warning: exported function PagesSiteMap should have comment or be unexported (golint)
    • Line 32: warning: exported function OpensearchDescription should have comment or be unexported (golint)
    • platform/models/merchant.go
    • Line 222: warning: receiver name merchant should be consistent with previous receiver name m for Merchant (golint)
    • Line 230: warning: receiver name merchant should be consistent with previous receiver name m for Merchant (golint)
    • platform/models/password_token.go
    • Line 18: warning: exported type PasswordToken should have comment or be unexported (golint)
    • Line 28: warning: exported type TokenType should have comment or be unexported (golint)
    • Line 31: warning: exported const ChangePassword should have comment (or a comment on this block) or be unexported (golint)
    • Line 51: warning: comment on exported function GetPasswordToken should be of the form "GetPasswordToken ..." (golint)
    • platform/resolvers/booking.go
    • Line 21: warning: exported var ErrServiceSubCategoryNotFound should have comment or be unexported (golint)
    • Line 22: warning: exported var ErrServiceProviderNotFound should have comment or be unexported (golint)
    • platform/models/oauth2.go
    • Line 87: warning: comment on exported type AuthorizationCode should be of the form "AuthorizationCode ..." (with optional leading article) (golint)
    • Line 309: warning: exported method RefreshToken.Client should have comment or be unexported (golint)
    • Line 313: warning: exported method RefreshToken.User should have comment or be unexported (golint)
    • Line 489: warning: comment on exported function DeleteRefreshTokensByFilter should be of the form "DeleteRefreshTokensByFilter ..." (golint)
    • Line 512: warning: comment on exported function DeleteAuthorizationCodeByID should be of the form "DeleteAuthorizationCodeByID ..." (golint)
    • Line 561: warning: receiver name refreshToken should be consistent with previous receiver name r for RefreshToken (golint)
    • Line 569: warning: receiver name refreshToken should be consistent with previous receiver name r for RefreshToken (golint)
    • Line 700: warning: comment on exported function GetAuthorizationCodeByFilter should be of the form "GetAuthorizationCodeByFilter ..." (golint)
    • Line 790: warning: comment on exported function DeleteAccessToken should be of the form "DeleteAccessToken ..." (golint)
    • Line 867: warning: comment on exported function NewOAuthAccessToken should be of the form "NewOAuthAccessToken ..." (golint)
    • Line 883: warning: comment on exported function NewOAuthAuthorizationCode should be of the form "NewOAuthAuthorizationCode ..." (golint)
    • platform/models/utils.go
    • Line 33: warning: exported type PageInfoUtility should have comment or be unexported (golint)
    • Line 78: warning: exported function PaginationUtility should have comment or be unexported (golint)
    • platform/models/cart.go
    • Line 23: warning: exported type Cart should have comment or be unexported (golint)
    • Line 34: warning: exported type CartItem should have comment or be unexported (golint)
    • Line 99: warning: comment on exported function GetCartByFilter should be of the form "GetCartByFilter ..." (golint)
    • Line 138: warning: error should be the last type when returning multiple items (golint)
    • platform/utils/echo_template/template.go
    • Line 1: warning: package comment should be of the form "Package echo_template ..." (golint)
    • Line 1: warning: package comment should not have leading space (golint)
    • Line 4: warning: don't use an underscore in package name (golint)
    • Line 21: warning: exported var DefaultConfig should have comment or be unexported (golint)
    • Line 31: warning: exported type TemplateEngine should have comment or be unexported (golint)
    • Line 38: warning: exported type TemplateConfig should have comment or be unexported (golint)
    • Line 48: warning: exported type Delims should have comment or be unexported (golint)
    • Line 53: warning: exported type FileHandler should have comment or be unexported (golint)
    • Line 55: warning: exported function New should have comment or be unexported (golint)
    • Line 64: warning: exported function Default should have comment or be unexported (golint)
    • Line 68: warning: exported method TemplateEngine.Render should have comment or be unexported (golint)
    • Line 152: warning: exported method TemplateEngine.SetFileHandler should have comment or be unexported (golint)
    • Line 159: warning: comment on exported function Render should be of the form "Render ..." (golint)
    • Line 170: warning: comment on exported function NewMiddleware should be of the form "NewMiddleware ..." (golint)
    • Line 175: warning: exported function Middleware should have comment or be unexported (golint)
    • Line 184: warning: exported function DefaultFileHandler should have comment or be unexported (golint)
    • platform/migrate/migrate.go
    • Line 152: warning: exported type SMSJsonTemplate should have comment or be unexported (golint)
    • Line 192: warning: exported type EmailJsonTemplate should have comment or be unexported (golint)

ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell99%

Misspell Finds commonly misspelled English words