FaserF / ha-openwrt
Code health
Hotspots average 2.5, the place fixes pay off most.
Explore this codebase
- Code health map28hotspots across 155 files
- Ownership61sole-owned files: one author, no second reader
- Architecture5modules, 0 entry points
- Decisions10recorded, of which 0 accepted and 10 awaiting review
- Refactoring44open opportunities, one per file
- TestsNo coverage report yet. Run your tests with coverage on, then add the report:
AlsoDocsChatFilesKnowledge graphChange couplingCommitsStatsCosts
Do next · 3
4 things worth doing in the week to Aug 27, the last indexed commit, 1 of them now.
Worth planning
Start breaking up _async_update_device_registry (CCN 108, 293 lines)
custom_components/openwrt/coordinator.py:1844
_async_update_device_registry nests deeply; easier to read and change once split; its file is imported by 25 files, changed 52 times in 90 days.
- gain
- up to +0.1 health on this file(inferred)
- finding
- Nested complexity
- size
- CCN 108, 293 lines, nests 5 deep
- severity
- high
Medium effort, worth a checkStart breaking up get_wireless_interfaces (CCN 81, 324 lines): first lift lines 186-203
custom_components/openwrt/api/ubus/network.py:186
get_wireless_interfaces nests deeply; easier to read and change once split, which also removes a duplicate; function changed in 10 commits; its file is imported by 1 file, changed 17 times in 90 days.
- gain
- up to +0.8 health on this file(inferred)
- finding
- Nested complexity
- size
- CCN 81, 324 lines, nests 7 deep
- severity
- high
Medium effort, worth a checkStart breaking up get_connected_devices (CCN 90, 295 lines): first lift lines 238-284
custom_components/openwrt/api/luci_rpc/devices.py:238
get_connected_devices nests deeply; easier to read and change once split, which also removes a duplicate; function changed in 6 commits; its file is imported by 1 file, changed 9 times in 90 days.
- gain
- up to +0.5 health on this file(inferred)
- finding
- Nested complexity
- size
- CCN 90, 295 lines, nests 9 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
5 areas
Every detector's open count by area. The actions above are the part worth doing.
- Code health1,371 open findingsCriticalCo-change scatter · custom_components/openwrt/api/ssh/system.py64 findings · 8.0 deducted
- Refactoring44 open opportunitiesMediumbump_version+1.5 health, S effort · .github/scripts/bump_version.py
- Decisions10 to reviewMediumcustom_components/openwrt/sensor.py10 awaiting review, 0 drifting from the code
- Ownership61 sole-owned filesMediumcustom_components/openwrt/api/base.pyOne author, no second reader
- Dead code3Lowasync_delete_wan_down_repairUnreachable function (9 lines)