ankidroid / anki-android
Code health
Hotspots average 8.1, the place fixes pay off most.
Explore this codebase
- Code health map193hotspots across 2,140 files
- Ownership939sole-owned files: one author, no second reader
- Architecture18modules, 89 entry points
- Decisions49recorded, of which 0 in force and 49 background
- Refactoring6open opportunities, one per file
- TestsNo coverage report yet. Run your tests with coverage on, then add the report:
AlsoDocsChatFilesKnowledge graphChange couplingCommitsStatsCosts
Do next · 6 · 1 setup step
7 things worth doing in the week to Nov 23, the last indexed commit, 1 of them now · 1 setup step.
Worth planning
Break up setupEditor (CCN 46, 246 lines)
AnkiDroid/src/main/java/com/ichi2/anki/NoteEditorFragment.kt:858
setupEditor has many paths; easier to read and change once split; its file is imported by 24 files, changed 55 times in 90 days.
- gain
- up to under +0.1 health on this file(inferred)
- finding
- Complex method
- size
- CCN 46, 246 lines, nests 4 deep
- severity
- high
Medium effort, worth a checkTidy the code shape this week's commits left: 1 finding in
AnkiDroid/src/main/java/com/ichi2/compose/ui/dialogs/TextInputValidation.kt1 commit in the last 7 days added or worsened long, complex or deeply nested code, still open. Start with
AnkiDroid/src/main/java/com/ichi2/compose/ui/dialogs/TextInputValidation.kt(1 finding): tidying it while the change is fresh costs less than after the next one.- code-shape findings
- 1
- files
- 1
- commits
- 1
Medium effortReview why fixes keep landing in
AnkiDroid/src/main/java/com/ichi2/anki/CardBrowser.kt: tests reach itChanged 27 times in 90 days, and 10 of those commits were bug fixes.
- commits in 90 days
- 27
- bug-fix commits
- 10
- line coverage
- Unknown, no report
- tests that reach it
- 3 test files, call graph(inferred)
Medium effort, worth a checkReview why fixes keep landing in
AnkiDroid/src/main/java/com/ichi2/anki/DeckPicker.kt: tests reach itChanged 83 times in 90 days, and 35 of those commits were bug fixes.
- commits in 90 days
- 83
- bug-fix commits
- 35
- line coverage
- Unknown, no report
- tests that reach it
- 12 test files, call graph(inferred)
Large effort, worth a checkReview why fixes keep landing in
AnkiDroid/src/main/java/com/ichi2/anki/browser/CardBrowserFragment.kt: tests reach itChanged 50 times in 90 days, and 22 of those commits were bug fixes.
- commits in 90 days
- 50
- bug-fix commits
- 22
- line coverage
- Unknown, no report
- tests that reach it
- 5 test files, call graph(inferred)
Large effort, worth a check
Everything we found
6 areas
Every detector's open count by area. The actions above are the part worth doing.
- Code health1,819 open findingsCriticalChange entropy · AnkiDroid/src/main/java/com/ichi2/anki/NoteEditorFragment.kt29 findings · 10.2 deducted
- Refactoring6 open opportunitiesLowmain+0.8 health, M effort · .github/report_test_failures.py
- Doc drift1Medium.oss-scanner/README.mdDocument names tools/validate.py, which no longer exists.
- Decisions0 drifting from the codeMediumAnkiDroid/src/main/java/com/ichi2/anki/DeckPicker.ktHigh-churn file with no governing decision
- Ownership939 sole-owned filesMediumAnkiDroid/src/main/java/com/ichi2/anki/browser/CardBrowserViewModel.ktOne author, no second reader
- Dead code1LowtoJsonArrayUnreachable function (7 lines)