Preparing report...

Report for github.com/jolheiser/gitea

A+    Excellent!    Found 223 issues across 911 files

Tweet

gofmt91%

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!


golint100%

Golint is a linter for Go source code.

No problems detected. Good job!


gocyclo88%

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.

    • gitea/models/gpg_key.go
    • Line 564: warning: cyclomatic complexity 32 of function ParseCommitWithSignature() is high (> 15) (gocyclo)
    • Line 494: warning: cyclomatic complexity 16 of function hashAndVerifyForKeyID() is high (> 15) (gocyclo)
    • gitea/cmd/admin.go
    • Line 260: warning: cyclomatic complexity 18 of function runCreateUser() is high (> 15) (gocyclo)
    • Line 460: warning: cyclomatic complexity 18 of function runUpdateOauth() is high (> 15) (gocyclo)
    • gitea/routers/api/v1/repo/repo.go
    • Line 555: warning: cyclomatic complexity 39 of function updateRepoUnits() is high (> 15) (gocyclo)
    • Line 475: warning: cyclomatic complexity 23 of function updateBasicProperties() is high (> 15) (gocyclo)
    • Line 43: warning: cyclomatic complexity 19 of function Search() is high (> 15) (gocyclo)
    • gitea/models/issue.go
    • Line 1714: warning: cyclomatic complexity 29 of function (*Issue).ResolveMentionsByVisibility() is high (> 15) (gocyclo)
    • Line 883: warning: cyclomatic complexity 24 of function newIssue() is high (> 15) (gocyclo)
    • Line 1433: warning: cyclomatic complexity 18 of function GetUserIssueStats() is high (> 15) (gocyclo)
    • Line 1149: warning: cyclomatic complexity 17 of function (*IssuesOptions).setupSession() is high (> 15) (gocyclo)
    • gitea/routers/repo/pull.go
    • Line 676: warning: cyclomatic complexity 29 of function MergePullRequest() is high (> 15) (gocyclo)
    • Line 330: warning: cyclomatic complexity 27 of function PrepareViewPullInfo() is high (> 15) (gocyclo)
    • Line 962: warning: cyclomatic complexity 23 of function CleanUpPullRequest() is high (> 15) (gocyclo)
    • Line 170: warning: cyclomatic complexity 17 of function ForkPost() is high (> 15) (gocyclo)
    • Line 86: warning: cyclomatic complexity 17 of function getForkRepository() is high (> 15) (gocyclo)
    • gitea/routers/api/v1/repo/pull.go
    • Line 336: warning: cyclomatic complexity 33 of function EditPullRequest() is high (> 15) (gocyclo)
    • Line 540: warning: cyclomatic complexity 32 of function MergePullRequest() is high (> 15) (gocyclo)
    • Line 696: warning: cyclomatic complexity 19 of function parseCompareInfo() is high (> 15) (gocyclo)
    • Line 172: warning: cyclomatic complexity 19 of function CreatePullRequest() is high (> 15) (gocyclo)
    • gitea/routers/user/auth.go
    • Line 843: warning: cyclomatic complexity 32 of function LinkAccountPostRegister() is high (> 15) (gocyclo)
    • Line 1021: warning: cyclomatic complexity 23 of function SignUpPost() is high (> 15) (gocyclo)
    • Line 1344: warning: cyclomatic complexity 18 of function ResetPasswdPost() is high (> 15) (gocyclo)
    • gitea/routers/private/hook.go
    • Line 120: warning: cyclomatic complexity 31 of function HookPreReceive() is high (> 15) (gocyclo)
    • Line 297: warning: cyclomatic complexity 30 of function HookPostReceive() is high (> 15) (gocyclo)
    • gitea/routers/api/v1/repo/issue.go
    • Line 457: warning: cyclomatic complexity 30 of function EditIssue() is high (> 15) (gocyclo)
    • Line 27: warning: cyclomatic complexity 26 of function SearchIssues() is high (> 15) (gocyclo)
    • Line 181: warning: cyclomatic complexity 17 of function ListIssues() is high (> 15) (gocyclo)
    • Line 342: warning: cyclomatic complexity 16 of function CreateIssue() is high (> 15) (gocyclo)
    • gitea/models/org_team.go
    • Line 578: warning: cyclomatic complexity 19 of function UpdateTeam() is high (> 15) (gocyclo)
    • Line 461: warning: cyclomatic complexity 18 of function NewTeam() is high (> 15) (gocyclo)
    • Line 850: warning: cyclomatic complexity 16 of function removeTeamMember() is high (> 15) (gocyclo)
    • gitea/models/repo_watch.go
    • Line 171: warning: cyclomatic complexity 25 of function notifyWatchers() is high (> 15) (gocyclo)
    • Line 59: warning: cyclomatic complexity 16 of function watchRepoMode() is high (> 15) (gocyclo)
    • gitea/models/login_source.go
    • Line 725: warning: cyclomatic complexity 21 of function UserSignIn() is high (> 15) (gocyclo)
    • Line 464: warning: cyclomatic complexity 20 of function LoginViaLDAP() is high (> 15) (gocyclo)
    • gitea/routers/home.go
    • Line 282: warning: cyclomatic complexity 22 of function ExploreCode() is high (> 15) (gocyclo)
    • Line 91: warning: cyclomatic complexity 16 of function RenderRepoSearch() is high (> 15) (gocyclo)
    • gitea/models/repo.go
    • Line 1426: warning: cyclomatic complexity 50 of function DeleteRepository() is high (> 15) (gocyclo)
    • Line 1118: warning: cyclomatic complexity 31 of function TransferOwnership() is high (> 15) (gocyclo)
    • Line 972: warning: cyclomatic complexity 25 of function CreateRepository() is high (> 15) (gocyclo)
    • Line 1872: warning: cyclomatic complexity 21 of function CheckRepoStats() is high (> 15) (gocyclo)
    • Line 1307: warning: cyclomatic complexity 20 of function updateRepository() is high (> 15) (gocyclo)
    • gitea/routers/repo/issue.go
    • Line 618: warning: cyclomatic complexity 107 of function ViewIssue() is high (> 15) (gocyclo)
    • Line 1260: warning: cyclomatic complexity 35 of function NewComment() is high (> 15) (gocyclo)
    • Line 107: warning: cyclomatic complexity 28 of function issues() is high (> 15) (gocyclo)
    • Line 1564: warning: cyclomatic complexity 21 of function ChangeCommentReaction() is high (> 15) (gocyclo)
    • Line 1469: warning: cyclomatic complexity 19 of function ChangeIssueReaction() is high (> 15) (gocyclo)
    • gitea/cmd/hook.go
    • Line 277: warning: cyclomatic complexity 24 of function runHookPostReceive() is high (> 15) (gocyclo)
    • Line 142: warning: cyclomatic complexity 19 of function runHookPreReceive() is high (> 15) (gocyclo)
    • gitea/routers/user/home.go
    • Line 340: warning: cyclomatic complexity 48 of function Issues() is high (> 15) (gocyclo)
    • Line 160: warning: cyclomatic complexity 36 of function Milestones() is high (> 15) (gocyclo)
    • gitea/routers/repo/lfs.go
    • Line 385: warning: cyclomatic complexity 26 of function LFSFileFind() is high (> 15) (gocyclo)
    • Line 79: warning: cyclomatic complexity 19 of function LFSLocks() is high (> 15) (gocyclo)
    • Line 252: warning: cyclomatic complexity 18 of function LFSFileGet() is high (> 15) (gocyclo)
    • gitea/routers/repo/editor.go
    • Line 351: warning: cyclomatic complexity 28 of function DeleteFilePost() is high (> 15) (gocyclo)
    • Line 163: warning: cyclomatic complexity 25 of function editFilePost() is high (> 15) (gocyclo)
    • Line 504: warning: cyclomatic complexity 17 of function UploadFilePost() is high (> 15) (gocyclo)
    • gitea/models/user.go
    • Line 1753: warning: cyclomatic complexity 47 of function SyncExternalUsers() is high (> 15) (gocyclo)
    • Line 1113: warning: cyclomatic complexity 24 of function deleteUser() is high (> 15) (gocyclo)
    • gitea/models/org.go
    • Line 578: warning: cyclomatic complexity 21 of function removeOrgUser() is high (> 15) (gocyclo)
    • Line 139: warning: cyclomatic complexity 16 of function CreateOrganization() is high (> 15) (gocyclo)
    • gitea/modules/context/repo.go
    • Line 374: warning: cyclomatic complexity 37 of function RepoAssignment() is high (> 15) (gocyclo)
    • Line 678: warning: cyclomatic complexity 20 of function RepoRefByType() is high (> 15) (gocyclo)
    • gitea/models/repo_sign.go
    • Line 134: warning: cyclomatic complexity 17 of function (*Repository).SignWikiCommit() is high (> 15) (gocyclo)
    • Line 186: warning: cyclomatic complexity 17 of function (*Repository).SignCRUDAction() is high (> 15) (gocyclo)
    • gitea/routers/repo/view.go
    • Line 201: warning: cyclomatic complexity 44 of function renderFile() is high (> 15) (gocyclo)
    • Line 38: warning: cyclomatic complexity 29 of function renderDirectory() is high (> 15) (gocyclo)

ineffassign98%

IneffAssign detects ineffectual assignments in Go code.

    • gitea/integrations/api_repo_topic_test.go
    • Line 44: warning: ineffectual assignment to res (ineffassign)
    • Line 48: warning: ineffectual assignment to res (ineffassign)
    • Line 52: warning: ineffectual assignment to res (ineffassign)
    • Line 65: warning: ineffectual assignment to res (ineffassign)
    • Line 76: warning: ineffectual assignment to res (ineffassign)
    • Line 87: warning: ineffectual assignment to res (ineffassign)
    • Line 98: warning: ineffectual assignment to res (ineffassign)
    • Line 102: warning: ineffectual assignment to res (ineffassign)
    • Line 106: warning: ineffectual assignment to res (ineffassign)
    • Line 122: warning: ineffectual assignment to res (ineffassign)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell91%

Misspell Finds commonly misspelled English words

    • gitea/cmd/dump.go
    • Line 20: warning: "unknwon" is a misspelling of "unknown" (misspell)
    • Line 21: warning: "unknwon" is a misspelling of "unknown" (misspell)