repowiseankidroid/anki-android

Code health of ankidroid/anki-android

Repowise scores ankidroid/anki-android at 8.8 out of 10 for code health, which reads as excellent, alongside maintainability 9.6 and static performance 9.9 on the same scale. There are 1,819 open findings across the three pillars, and the lowest-scoring file is NoteEditorFragment.kt at 1.0. Scores are computed from complexity, duplication, churn and git fix history, not from a linter.

Findings by severity

393 critical, 409 high, 748 medium, 269 low.

Hotspots

193 files are flagged as hotspots. The top 5:

  • AnkiDroid/src/main/java/com/ichi2/anki/DeckPicker.kt: 83 commits in the last 90 days from 135 contributors with 45 recent bug fixes
  • AnkiDroid/src/main/java/com/ichi2/anki/CardBrowser.kt: 27 commits in the last 90 days from 100 contributors with 15 recent bug fixes
  • AnkiDroid/src/main/java/com/ichi2/anki/browser/CardBrowserFragment.kt: 50 commits in the last 90 days from 17 contributors with 30 recent bug fixes
  • AnkiDroid/src/main/java/com/ichi2/anki/NoteEditorFragment.kt: 55 commits in the last 90 days from 127 contributors with 22 recent bug fixes
  • AnkiDroid/src/main/java/com/ichi2/anki/browser/CardBrowserViewModel.kt: 32 commits in the last 90 days from 15 contributors with 20 recent bug fixes

Lowest-scoring files

  • AnkiDroid/src/main/java/com/ichi2/anki/NoteEditorFragment.kt: 1.0 out of 10 with 22 bug fixes in the last 180 days
  • AnkiDroid/src/main/java/com/ichi2/anki/AbstractFlashcardViewer.kt: 2.3 out of 10 with 7 bug fixes in the last 180 days
  • AnkiDroid/src/main/java/com/ichi2/anki/Reviewer.kt: 2.9 out of 10 with 15 bug fixes in the last 180 days
  • AnkiDroid/src/main/java/com/ichi2/anki/DeckPicker.kt: 3.1 out of 10 with 45 bug fixes in the last 180 days
  • AnkiDroid/src/main/java/com/ichi2/anki/dialogs/DatabaseErrorDialog.kt: 3.7 out of 10 with 4 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 2,067 scored files, 15.5% had a bug fix in that window.

Dead code and refactoring

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

More on anki-android: summary and FAQ, codebase overview, architecture.

Related guide: Best dead code detection tools by language