repowisego-gitea/gitea

Code health of go-gitea/gitea

Repowise scores go-gitea/gitea at 7.0 out of 10 for code health, which reads as good, alongside maintainability 7.8 and static performance 9.8 on the same scale. There are 9,550 open findings across the three pillars, and the lowest-scoring file is pull.go at 1.0. Scores are computed from complexity, duplication, churn and git fix history, not from a linter.

Findings by severity

886 critical, 1,882 high, 3,268 medium, 3,341 low.

Hotspots

315 files are flagged as hotspots. The top 5:

  • routers/web/repo/actions/view.go: 21 commits in the last 90 days from 29 contributors with 12 recent bug fixes
  • services/gitdiff/gitdiff.go: 17 commits in the last 90 days from 62 contributors with 6 recent bug fixes
  • routers/web/repo/pull.go: 21 commits in the last 90 days from 105 contributors with 14 recent bug fixes
  • web_src/js/components/RepoActionView.vue: 10 commits in the last 90 days from 25 contributors with 5 recent bug fixes
  • routers/api/v1/repo/action.go: 10 commits in the last 90 days from 24 contributors with 7 recent bug fixes

Lowest-scoring files

  • routers/web/repo/pull.go: 1.0 out of 10 with 14 bug fixes in the last 180 days
  • routers/web/repo/issue_comment.go: 1.0 out of 10 with 2 bug fixes in the last 180 days
  • routers/web/repo/issue_new.go: 1.0 out of 10
  • routers/api/v1/repo/branch.go: 1.7 out of 10 with 3 bug fixes in the last 180 days
  • routers/web/repo/issue_page_meta.go: 1.8 out of 10 with 2 bug fixes in the last 180 days

Checked against bug fixes

Of the 20 files Repowise scores lowest, 16 had a bug fix in the last 180 days. Across all 3,532 scored files, 13.3% had a bug fix in that window.

Dead code and refactoring

Repowise found 25 unused exports. 267 refactoring targets across 267 files would raise the score.

More on gitea: summary and FAQ, codebase overview, architecture.

Related guide: Best dead code detection tools by language