Preparing report...

Report for github.com/unfoldingWord-dev/gogs

A+    Excellent!    Found 155 issues across 1415 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!


golint100%

Golint is a linter for Go source code.

No problems detected. Good job!


gocyclo89%

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.

    • gogs/routers/api/v1/repo/repo.go
    • Line 768: warning: cyclomatic complexity 46 of function updateRepoUnits() is high (> 15) (gocyclo)
    • Line 672: warning: cyclomatic complexity 29 of function updateBasicProperties() is high (> 15) (gocyclo)
    • Line 47: warning: cyclomatic complexity 22 of function Search() is high (> 15) (gocyclo)
    • Line 345: warning: cyclomatic complexity 16 of function Generate() is high (> 15) (gocyclo)
    • gogs/routers/web/user/auth.go
    • Line 969: warning: cyclomatic complexity 27 of function LinkAccountPostRegister() is high (> 15) (gocyclo)
    • Line 1610: warning: cyclomatic complexity 21 of function ResetPasswdPost() is high (> 15) (gocyclo)
    • Line 1128: warning: cyclomatic complexity 19 of function SignUpPost() is high (> 15) (gocyclo)
    • Line 1238: warning: cyclomatic complexity 19 of function createUserInContext() is high (> 15) (gocyclo)
    • Line 705: warning: cyclomatic complexity 16 of function handleOAuth2SignIn() is high (> 15) (gocyclo)
    • Line 156: warning: cyclomatic complexity 16 of function SignInPost() is high (> 15) (gocyclo)
    • Line 598: warning: cyclomatic complexity 16 of function SignInOAuthCallback() is high (> 15) (gocyclo)
    • gogs/cmd/admin.go
    • Line 640: warning: cyclomatic complexity 19 of function runUpdateOauth() is high (> 15) (gocyclo)
    • Line 369: warning: cyclomatic complexity 18 of function runCreateUser() is high (> 15) (gocyclo)
    • gogs/routers/api/v1/repo/pull.go
    • Line 692: warning: cyclomatic complexity 50 of function MergePullRequest() is high (> 15) (gocyclo)
    • Line 443: warning: cyclomatic complexity 43 of function EditPullRequest() is high (> 15) (gocyclo)
    • Line 260: warning: cyclomatic complexity 23 of function CreatePullRequest() is high (> 15) (gocyclo)
    • Line 917: warning: cyclomatic complexity 19 of function parseCompareInfo() is high (> 15) (gocyclo)
    • Line 1045: warning: cyclomatic complexity 16 of function UpdatePullRequest() is high (> 15) (gocyclo)
    • gogs/services/pull/pull.go
    • Line 563: warning: cyclomatic complexity 37 of function GetSquashMergeCommitMessages() is high (> 15) (gocyclo)
    • Line 233: warning: cyclomatic complexity 26 of function AddTestPullRequestTask() is high (> 15) (gocyclo)
    • Line 332: warning: cyclomatic complexity 19 of function checkIfPRContentChanged() is high (> 15) (gocyclo)
    • Line 27: warning: cyclomatic complexity 16 of function NewPullRequest() is high (> 15) (gocyclo)
    • gogs/modules/timeutil/since.go
    • Line 91: warning: cyclomatic complexity 22 of function computeTimeDiff() is high (> 15) (gocyclo)
    • Line 33: warning: cyclomatic complexity 16 of function computeTimeDiffFloor() is high (> 15) (gocyclo)
    • gogs/services/gitdiff/gitdiff.go
    • Line 690: warning: cyclomatic complexity 60 of function ParsePatch() is high (> 15) (gocyclo)
    • Line 943: warning: cyclomatic complexity 40 of function parseHunks() is high (> 15) (gocyclo)
    • Line 1220: warning: cyclomatic complexity 35 of function GetDiffRangeWithWhitespaceBehavior() is high (> 15) (gocyclo)
    • Line 207: warning: cyclomatic complexity 30 of function fixupBrokenSpans() is high (> 15) (gocyclo)
    • gogs/modules/repository/repo.go
    • Line 48: warning: cyclomatic complexity 28 of function MigrateRepositoryGitData() is high (> 15) (gocyclo)
    • Line 319: warning: cyclomatic complexity 22 of function StoreMissingLfsObjectsInRepository() is high (> 15) (gocyclo)
    • gogs/routers/web/repo/editor.go
    • Line 414: warning: cyclomatic complexity 32 of function DeleteFilePost() is high (> 15) (gocyclo)
    • Line 190: warning: cyclomatic complexity 31 of function editFilePost() is high (> 15) (gocyclo)
    • Line 578: warning: cyclomatic complexity 30 of function UploadFilePost() is high (> 15) (gocyclo)
    • gogs/services/pull/review.go
    • Line 116: warning: cyclomatic complexity 24 of function createCodeComment() is high (> 15) (gocyclo)
    • Line 22: warning: cyclomatic complexity 16 of function CreateCodeComment() is high (> 15) (gocyclo)
    • gogs/routers/web/repo/pull.go
    • Line 812: warning: cyclomatic complexity 43 of function MergePullRequest() is high (> 15) (gocyclo)
    • Line 353: warning: cyclomatic complexity 40 of function PrepareViewPullInfo() is high (> 15) (gocyclo)
    • Line 591: warning: cyclomatic complexity 26 of function ViewPullFiles() is high (> 15) (gocyclo)
    • Line 1204: warning: cyclomatic complexity 25 of function CleanUpPullRequest() is high (> 15) (gocyclo)
    • Line 88: warning: cyclomatic complexity 18 of function getForkRepository() is high (> 15) (gocyclo)
    • Line 173: warning: cyclomatic complexity 17 of function ForkPost() is high (> 15) (gocyclo)
    • Line 728: warning: cyclomatic complexity 16 of function UpdatePullRequest() is high (> 15) (gocyclo)
    • gogs/services/lfs/server.go
    • Line 148: warning: cyclomatic complexity 24 of function BatchHandler() is high (> 15) (gocyclo)
    • Line 264: warning: cyclomatic complexity 16 of function UploadHandler() is high (> 15) (gocyclo)
    • gogs/routers/web/user/home.go
    • Line 370: warning: cyclomatic complexity 52 of function buildIssueOverview() is high (> 15) (gocyclo)
    • Line 170: warning: cyclomatic complexity 29 of function Milestones() is high (> 15) (gocyclo)
    • gogs/services/mirror/mirror_pull.go
    • Line 258: warning: cyclomatic complexity 21 of function SyncPullMirror() is high (> 15) (gocyclo)
    • Line 389: warning: cyclomatic complexity 20 of function checkAndUpdateEmptyRepository() is high (> 15) (gocyclo)
    • Line 144: warning: cyclomatic complexity 17 of function runSync() is high (> 15) (gocyclo)
    • gogs/routers/web/repo/view.go
    • Line 131: warning: cyclomatic complexity 63 of function renderDirectory() is high (> 15) (gocyclo)
    • Line 407: warning: cyclomatic complexity 46 of function renderFile() is high (> 15) (gocyclo)
    • Line 61: warning: cyclomatic complexity 26 of function getReadmeFileFromPath() is high (> 15) (gocyclo)
    • gogs/cmd/hook.go
    • Line 487: warning: cyclomatic complexity 38 of function runHookProcReceive() is high (> 15) (gocyclo)
    • Line 308: warning: cyclomatic complexity 25 of function runHookPostReceive() is high (> 15) (gocyclo)
    • Line 164: warning: cyclomatic complexity 22 of function runHookPreReceive() is high (> 15) (gocyclo)
    • gogs/services/wiki/wiki.go
    • Line 116: warning: cyclomatic complexity 28 of function updateWikiPage() is high (> 15) (gocyclo)
    • Line 275: warning: cyclomatic complexity 18 of function DeleteWikiPage() is high (> 15) (gocyclo)
    • gogs/routers/web/repo/issue.go
    • Line 1043: warning: cyclomatic complexity 149 of function ViewIssue() is high (> 15) (gocyclo)
    • Line 463: warning: cyclomatic complexity 44 of function RetrieveRepoReviewers() is high (> 15) (gocyclo)
    • Line 111: warning: cyclomatic complexity 43 of function issues() is high (> 15) (gocyclo)
    • Line 1992: warning: cyclomatic complexity 35 of function NewComment() is high (> 15) (gocyclo)
    • Line 2313: warning: cyclomatic complexity 21 of function ChangeCommentReaction() is high (> 15) (gocyclo)
    • Line 1827: warning: cyclomatic complexity 20 of function UpdatePullReviewRequest() is high (> 15) (gocyclo)
    • Line 2217: warning: cyclomatic complexity 19 of function ChangeIssueReaction() is high (> 15) (gocyclo)
    • Line 832: warning: cyclomatic complexity 18 of function ValidateRepoMetas() is high (> 15) (gocyclo)
    • Line 2533: warning: cyclomatic complexity 16 of function combineLabelComments() is high (> 15) (gocyclo)
    • gogs/routers/private/hook.go
    • Line 122: warning: cyclomatic complexity 65 of function HookPreReceive() is high (> 15) (gocyclo)
    • Line 500: warning: cyclomatic complexity 35 of function HookPostReceive() is high (> 15) (gocyclo)
    • gogs/modules/context/repo.go
    • Line 401: warning: cyclomatic complexity 41 of function RepoAssignment() is high (> 15) (gocyclo)
    • Line 731: warning: cyclomatic complexity 24 of function RepoRefByType() is high (> 15) (gocyclo)
    • Line 686: warning: cyclomatic complexity 16 of function getRefName() is high (> 15) (gocyclo)
    • gogs/cmd/web.go
    • Line 191: warning: cyclomatic complexity 18 of function listen() is high (> 15) (gocyclo)
    • Line 81: warning: cyclomatic complexity 17 of function runWeb() is high (> 15) (gocyclo)
    • gogs/modules/gitgraph/parser.go
    • Line 262: warning: cyclomatic complexity 17 of function (*Parser).setOutFlow() is high (> 15) (gocyclo)
    • Line 288: warning: cyclomatic complexity 16 of function (*Parser).setInFlow() is high (> 15) (gocyclo)
    • gogs/modules/markup/html.go
    • Line 606: warning: cyclomatic complexity 40 of function shortLinkProcessorFull() is high (> 15) (gocyclo)
    • Line 350: warning: cyclomatic complexity 27 of function visitNode() is high (> 15) (gocyclo)
    • Line 800: warning: cyclomatic complexity 17 of function issueIndexPatternProcessor() is high (> 15) (gocyclo)
    • gogs/routers/api/v1/repo/issue.go
    • Line 30: warning: cyclomatic complexity 35 of function SearchIssues() is high (> 15) (gocyclo)
    • Line 666: warning: cyclomatic complexity 33 of function EditIssue() is high (> 15) (gocyclo)
    • Line 279: warning: cyclomatic complexity 28 of function ListIssues() is high (> 15) (gocyclo)
    • Line 550: warning: cyclomatic complexity 16 of function CreateIssue() is high (> 15) (gocyclo)
    • gogs/services/mailer/mail.go
    • Line 398: warning: cyclomatic complexity 22 of function actionToTemplate() is high (> 15) (gocyclo)
    • Line 211: warning: cyclomatic complexity 16 of function composeIssueCommentMessages() is high (> 15) (gocyclo)
    • gogs/routers/web/repo/lfs.go
    • Line 249: warning: cyclomatic complexity 20 of function LFSFileGet() is high (> 15) (gocyclo)
    • Line 70: warning: cyclomatic complexity 19 of function LFSLocks() is high (> 15) (gocyclo)
    • Line 403: warning: cyclomatic complexity 16 of function LFSPointerFiles() is high (> 15) (gocyclo)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!