Code health
This codebase scores 5.1 out of 10 for code health, which we rate needs work. It also scores maintainability 5.6 and static performance 9.7 out of 10. The three are scored separately and never blended into one number. Risk is concentrated, as it usually is: 19 of 140 files are git hotspots, and they average 3.7 — which is where the fixes pay off most.
4 things worth doing in the week to Sep 29, the last indexed commit, 4 of them now.
Clean up what this week's commits left: 5 serious findings in 4 files
1 commit in the last 7 days added or worsened them, and they are still open. Start with pageindex/flash/api.py, which has 1 critical.
Start breaking up detect_font_heading (CCN 158, 153 lines): first lift lines 192-198
pageindex/flash/heading_detection/style_detectors.py:192
detect_font_heading has many independent paths through it; 2 files import it, changed 1 time in 90 days.
Start breaking up _parse_tounicode_cmap (CCN 89, 194 lines): first lift lines 193-201
pageindex/flash/parser_pdfium_charlevel/cmap_parse.py:193
_parse_tounicode_cmap nests its control flow deeply, and part of it is duplicated, so splitting it also removes a copy; 4 files import it, changed 1 time in 90 days.
Start breaking up _tokenize_show_operators (CCN 112, 248 lines): first lift lines 349-363
pageindex/flash/parser_pdfium_charlevel/content_stream.py:349
_tokenize_show_operators nests its control flow deeply, and part of it is duplicated, so splitting it also removes a copy; 3 files import it, changed 1 time in 90 days.
Add a test coverage report
Without one, Repowise cannot tell tested code from untested code, so every test-related action says “unknown”.
Every detector's open count by area, each with its worst example. An inventory, not a to-do list: the actions above are the part worth doing.