Preparing report...

Report for github.com/almighty/almighty-core

A+    Excellent!    Found 88 issues across 448 files

Tweet

gofmt98%

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!


gocyclo93%

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.

    • almighty-core/workitem/simple_type.go
    • Line 184: warning: cyclomatic complexity 38 of function (SimpleType).ConvertToStringSlice() is high (> 15) (gocyclo)
    • Line 87: warning: cyclomatic complexity 35 of function (SimpleType).ConvertToModel() is high (> 15) (gocyclo)
    • Line 298: warning: cyclomatic complexity 17 of function (SimpleType).ConvertFromModel() is high (> 15) (gocyclo)
    • almighty-core/kubernetes/deployments_kubeclient.go
    • Line 1867: warning: cyclomatic complexity 34 of function (*kubeClient).getRoutesByService() is high (> 15) (gocyclo)
    • Line 1489: warning: cyclomatic complexity 34 of function (*kubeClient).GetDeploymentPodQuota() is high (> 15) (gocyclo)
    • Line 1256: warning: cyclomatic complexity 19 of function (*kubeClient).getResourceQuota() is high (> 15) (gocyclo)
    • Line 967: warning: cyclomatic complexity 16 of function (*kubeClient).getDeploymentConfigNameForApp() is high (> 15) (gocyclo)
    • almighty-core/workitem/workitem_repository.go
    • Line 441: warning: cyclomatic complexity 34 of function (*GormWorkItemRepository).Reorder() is high (> 15) (gocyclo)
    • Line 1182: warning: cyclomatic complexity 27 of function (*GormWorkItemRepository).ChangeWorkItemType() is high (> 15) (gocyclo)
    • Line 581: warning: cyclomatic complexity 18 of function (*GormWorkItemRepository).Save() is high (> 15) (gocyclo)
    • Line 789: warning: cyclomatic complexity 18 of function (*GormWorkItemRepository).listItemsFromDB() is high (> 15) (gocyclo)
    • Line 693: warning: cyclomatic complexity 17 of function (*GormWorkItemRepository).Create() is high (> 15) (gocyclo)
    • Line 1336: warning: cyclomatic complexity 16 of function getValueOfRelationalKind() is high (> 15) (gocyclo)
    • almighty-core/controller/workitems.go
    • Line 53: warning: cyclomatic complexity 21 of function (*WorkitemsController).Create() is high (> 15) (gocyclo)
    • Line 160: warning: cyclomatic complexity 18 of function (*WorkitemsController).List() is high (> 15) (gocyclo)
    • almighty-core/controller/iteration.go
    • Line 198: warning: cyclomatic complexity 39 of function (*IterationController).Update() is high (> 15) (gocyclo)
    • Line 62: warning: cyclomatic complexity 16 of function (*IterationController).CreateChild() is high (> 15) (gocyclo)
    • almighty-core/controller/search.go
    • Line 293: warning: cyclomatic complexity 26 of function (*SearchController).Show() is high (> 15) (gocyclo)
    • Line 143: warning: cyclomatic complexity 19 of function (*SearchController).WorkitemsCSV() is high (> 15) (gocyclo)
    • almighty-core/controller/workitem.go
    • Line 330: warning: cyclomatic complexity 66 of function ConvertJSONAPIToWorkItem() is high (> 15) (gocyclo)
    • Line 572: warning: cyclomatic complexity 34 of function ConvertWorkItemsToCSV() is high (> 15) (gocyclo)
    • Line 944: warning: cyclomatic complexity 25 of function ConvertWorkItem() is high (> 15) (gocyclo)
    • Line 108: warning: cyclomatic complexity 23 of function (*WorkitemController).Update() is high (> 15) (gocyclo)
    • Line 843: warning: cyclomatic complexity 21 of function convertValueToString() is high (> 15) (gocyclo)
    • almighty-core/search/search_repository.go
    • Line 427: warning: cyclomatic complexity 34 of function (Query).generateExpression() is high (> 15) (gocyclo)
    • Line 270: warning: cyclomatic complexity 21 of function parseMap() is high (> 15) (gocyclo)
    • Line 703: warning: cyclomatic complexity 19 of function (*GormSearchRepository).listItemsFromDB() is high (> 15) (gocyclo)
    • Line 812: warning: cyclomatic complexity 18 of function (*GormSearchRepository).Filter() is high (> 15) (gocyclo)

golint89%

Golint is a linter for Go source code.

    • almighty-core/remoteworkitem/remoteworkitem.go
    • Line 60: warning: exported const RemoteAssigneeLogins should have comment (or a comment on this block) or be unexported (golint)
    • Line 90: warning: exported type AttributeConverter should have comment or be unexported (golint)
    • Line 113: warning: exported type ListStringConverter should have comment or be unexported (golint)
    • Line 115: warning: exported type GithubStateConverter should have comment or be unexported (golint)
    • Line 117: warning: exported type JiraStateConverter should have comment or be unexported (golint)
    • Line 169: warning: exported method GithubStateConverter.Convert should have comment or be unexported (golint)
    • Line 178: warning: exported method JiraStateConverter.Convert should have comment or be unexported (golint)
    • Line 191: warning: exported type AttributeMapper should have comment or be unexported (golint)
    • almighty-core/account/user.go
    • Line 97: warning: exported method GormUserRepository.LoadByUsername should have comment or be unexported (golint)
    • Line 193: warning: comment on exported method GormUserRepository.PermanentDelete should be of the form "PermanentDelete ..." (golint)
    • almighty-core/gormapplication/application.go
    • Line 54: warning: exported function NewGormDB should have comment or be unexported (golint)
    • Line 63: warning: exported type GormTransaction should have comment or be unexported (golint)
    • Line 67: warning: exported type GormDB should have comment or be unexported (golint)
    • Line 72: warning: exported method GormBase.WorkItems should have comment or be unexported (golint)
    • Line 76: warning: exported method GormBase.WorkItemTypes should have comment or be unexported (golint)
    • Line 80: warning: exported method GormBase.Spaces should have comment or be unexported (golint)
    • Line 84: warning: exported method GormBase.Trackers should have comment or be unexported (golint)
    • Line 87: warning: exported method GormBase.TrackerQueries should have comment or be unexported (golint)
    • Line 91: warning: exported method GormBase.SearchItems should have comment or be unexported (golint)
    • Line 165: warning: exported method GormBase.DB should have comment or be unexported (golint)
    • Line 187: warning: comment on exported method GormDB.BeginTransaction should be of the form "BeginTransaction ..." (golint)
    • almighty-core/jsonapi/jsonapi_utility.go
    • Line 20: warning: exported const ErrorCodeNotFound should have comment (or a comment on this block) or be unexported (golint)
    • Line 114: warning: comment on exported type BadRequestContext should be of the form "BadRequestContext ..." (with optional leading article) (golint)
    • Line 126: warning: comment on exported type NotFoundContext should be of the form "NotFoundContext ..." (with optional leading article) (golint)
    • Line 132: warning: comment on exported type UnauthorizedContext should be of the form "UnauthorizedContext ..." (with optional leading article) (golint)
    • Line 138: warning: comment on exported type ForbiddenContext should be of the form "ForbiddenContext ..." (with optional leading article) (golint)
    • Line 144: warning: comment on exported type ConflictContext should be of the form "ConflictContext ..." (with optional leading article) (golint)
    • almighty-core/space/space.go
    • Line 30: warning: exported var SpaceType should have comment or be unexported (golint)
    • Line 444: warning: exported method GormRepository.Search should have comment or be unexported (golint)
    • Line 453: warning: exported method GormRepository.LoadByOwner should have comment or be unexported (golint)
    • Line 461: warning: exported method GormRepository.LoadByOwnerAndName should have comment or be unexported (golint)
    • almighty-core/test/common.go
    • Line 1: warning: package comment should be of the form "Package test ..." (golint)
    • Line 10: warning: exported var TestOversizedNameObj should have comment or be unexported (golint)
    • Line 11: warning: exported var TestMaxsizedNameObj should have comment or be unexported (golint)
    • almighty-core/test/http.go
    • Line 14: warning: exported type DummyHttpClient should have comment or be unexported (golint)
    • Line 20: warning: exported type DummyHttpDoer should have comment or be unexported (golint)
    • Line 25: warning: exported method DummyHttpClient.Do should have comment or be unexported (golint)
    • Line 32: warning: exported function NewDummyHttpDoer should have comment or be unexported (golint)
    • Line 38: warning: exported function EqualURLs should have comment or be unexported (golint)
    • almighty-core/test/login.go
    • Line 108: warning: comment on exported function ServiceAsServiceAccountAdminConsole should be of the form "ServiceAsServiceAccountAdminConsole ..." (golint)
    • almighty-core/controller/space.go
    • Line 33: warning: comment on exported const APIStringTypeSpace should be of the form "APIStringTypeSpace ..." (golint)
    • Line 263: warning: context.Context should be the first parameter of a function (golint)
    • Line 359: warning: context.Context should be the first parameter of a function (golint)
    • Line 647: warning: comment on exported function IncludeBacklogTotalCount should be of the form "IncludeBacklogTotalCount ..." (golint)
    • almighty-core/rendering/markup_content.go
    • Line 10: warning: comment on exported const ContentKey should be of the form "ContentKey ..." (golint)
    • Line 12: warning: comment on exported const MarkupKey should be of the form "MarkupKey ..." (golint)
    • Line 16: warning: exported method MarkupContent.ToMap should have comment or be unexported (golint)
    • almighty-core/test/token/token.go
    • Line 23: warning: exported var TokenManager should have comment or be unexported (golint)
    • Line 115: warning: exported function ContextWithTokenAndRequestID should have comment or be unexported (golint)
    • Line 126: warning: exported function PrivateKey should have comment or be unexported (golint)
    • almighty-core/area/area.go
    • Line 22: warning: exported const APIStringTypeAreas should have comment or be unexported (golint)
    • Line 150: warning: comment on exported method GormAreaRepository.LoadMultiple should be of the form "LoadMultiple ..." (golint)
    • almighty-core/controller/workitemtype.go
    • Line 104: warning: comment on exported function ConvertFieldTypeFromModel should be of the form "ConvertFieldTypeFromModel ..." (golint)
    • Line 129: warning: exported function ConvertFieldTypeToModel should have comment or be unexported (golint)
    • Line 205: warning: exported function ConvertFieldDefinitionsToModel should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign97%

IneffAssign detects ineffectual assignments in Go code.


misspell95%

Misspell Finds commonly misspelled English words

    • almighty-core/configuration/configuration.go
    • Line 676: warning: "defualt" is a misspelling of "default" (misspell)
    • Line 685: warning: "defualt" is a misspelling of "default" (misspell)
    • Line 694: warning: "defualt" is a misspelling of "default" (misspell)
    • Line 704: warning: "defualt" is a misspelling of "default" (misspell)
    • Line 714: warning: "defualt" is a misspelling of "default" (misspell)
    • Line 724: warning: "defualt" is a misspelling of "default" (misspell)
    • Line 734: warning: "defualt" is a misspelling of "default" (misspell)
    • Line 744: warning: "defualt" is a misspelling of "default" (misspell)
    • Line 758: warning: "defualt" is a misspelling of "default" (misspell)
    • Line 938: warning: "preveiw" is a misspelling of "preview" (misspell)