repowisesanic-org/sanic

Code health of sanic-org/sanic

Repowise scores sanic-org/sanic at 7.2 out of 10 for code health, which reads as good. There are 493 open findings across the three pillars, and the lowest-scoring file is startup.py at 2.3. Scores are computed from complexity, duplication, churn and git fix history, not from a linter.

Findings by severity

23 critical, 140 high, 160 medium, 135 low.

Hotspots

10 files are flagged as hotspots. The top 5:

  • tests/test_http.py: 1 commit in the last 90 days from 4 contributors with 1 recent bug fix
  • sanic/exceptions.py: 1 commit in the last 90 days from 30 contributors with 1 recent bug fix
  • sanic/config.py: 1 commit in the last 90 days from 33 contributors with 1 recent bug fix
  • sanic/request/types.py: 1 commit in the last 90 days from 2 contributors with 1 recent bug fix
  • sanic/response/types.py: 1 commit in the last 90 days from 5 contributors with 1 recent bug fix

Lowest-scoring files

  • sanic/mixins/startup.py: 2.3 out of 10
  • sanic/app.py: 2.5 out of 10
  • sanic/cli/app.py: 2.5 out of 10
  • sanic/blueprints.py: 2.5 out of 10
  • sanic/signals.py: 2.5 out of 10

Checked against bug fixes

Of the 20 files Repowise scores lowest, 4 had a bug fix in the last 180 days. Across all 470 scored files, 2.8% had a bug fix in that window.

Dead code and refactoring

Repowise found 72 unused exports.

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

Related guide: Best dead code detection tools by language