ollama / ollama
Code health
Hotspots average 4.3, the place fixes pay off most.
Explore this codebase
- Code health map180hotspots across 1,220 files
- Ownership559sole-owned files: one author, no second reader
- Architecture39modules, 16 entry points
- Decisions48recorded, of which 0 accepted and 48 awaiting review
- Refactoring257open opportunities, one per file
- TestsNo coverage report yet. Run your tests with coverage on, then add the report:
AlsoDocsChatFilesKnowledge graphChange couplingCommitsStatsCosts
Do next · 4
4 things worth doing in the week to Oct 20, the last indexed commit.
Worth planning
Break up chat (CCN 128, 492 lines)
app/ui/ui.go:785
chat nests deeply; easier to read and change once split, which also removes a duplicate; function changed in 5 commits; its file is imported by 5 files, changed 10 times in 90 days.
- gain
- up to +0.7 health on this file(inferred)
- finding
- Nested complexity
- size
- CCN 128, 492 lines, nests 7 deep
- severity
- high
Medium effort, worth a checkStart breaking up FromChatRequest (CCN 53, 171 lines): first lift lines 734-786
openai/openai.go:734
FromChatRequest nests deeply; easier to read and change once split, which also removes a duplicate; function changed in 26 commits; its file is imported by 18 files, changed 10 times in 90 days.
- gain
- up to +1.1 health on this file(inferred)
- finding
- Nested complexity
- size
- CCN 53, 171 lines, nests 8 deep
- severity
- high
Medium effort, worth a checkTidy the code shape this week's commits left: 15 findings in 12 files
5 commits in the last 7 days added or worsened long, complex or deeply nested code, still open. Start with
mlxrunner/model/nemotron_h/nemotron_h.go(2 findings): tidying it while the change is fresh costs less than after the next one.- code-shape findings
- 15
- files
- 12
- commits
- 5
Large effortBreak up Completion (CCN 52, 214 lines)
llm/llama_server.go:1852
Completion nests deeply; easier to read and change once split, which also removes a duplicate; function changed in 8 commits; its file is imported by 56 files, changed 16 times in 90 days.
- gain
- up to +0.3 health on this file(inferred)
- finding
- Nested complexity
- size
- CCN 52, 214 lines, nests 5 deep
- severity
- high
Medium effort, worth a check
Improve what Repowise can see
Add a test coverage report
Without one, Repowise cannot tell tested code from untested code, so every test-related action says “unknown”.
- line coverage
- Unknown, no report
Small effort
Everything we found
6 areas
Every detector's open count by area. The actions above are the part worth doing.
- Code health5,490 open findingsCriticalCo-change scatter · app/cmd/app/app_darwin.go38 findings · 8.0 deducted
- Refactoring257 open opportunitiesLowdescribeModelFromManifest+0.5 health, S effort · server/model_list.go
- Doc drift2Mediumdocs/import.mdxLink points at #sharing-your-model-on-ollama-com, which docs/import.mdx no longer declares.
- Decisions48 to reviewMediumserver/routes.go48 awaiting review, 0 drifting from the code
- Ownership559 sole-owned filesMediumapp/ui/app/src/components/Onboarding.test.tsxOne author, no second reader
- Dead code8LowSelectSingleUnreachable function (3 lines)