repowisecenkalti/rain

Code health of cenkalti/rain

Repowise scores cenkalti/rain at 6.9 out of 10 for code health, which reads as fair, alongside maintainability 7.8 and static performance 9.9 on the same scale. There are 487 open findings across the three pillars, and the lowest-scoring file is console.go at 2.0. Scores are computed from complexity, duplication, churn and git fix history, not from a linter.

Findings by severity

18 critical, 67 high, 85 medium, 133 low.

Hotspots

1 file is flagged as hotspots. The top one:

  • internal/piecepicker/piecepicker.go: 5 commits in the last 90 days from 3 contributors with 1 recent bug fix

Lowest-scoring files

  • internal/console/console.go: 2.0 out of 10
  • internal/announcer/periodic.go: 2.0 out of 10
  • internal/peerconn/peerreader/peerreader.go: 2.1 out of 10
  • internal/metainfo/info.go: 2.4 out of 10
  • torrent/torrent_messagehandler.go: 2.5 out of 10

Checked against bug fixes

Of the 20 files Repowise scores lowest, 9 had a bug fix in the last 180 days. Across all 241 scored files, 11.2% had a bug fix in that window.

Dead code and refactoring

Repowise found 6 unused exports. 34 refactoring targets across 34 files would raise the score.

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

Related guide: Best dead code detection tools by language