Refactor analyzers and report builder helpers#5
Merged
pixge merged 1 commit intocodex/modify-scaffolding-and-implement-loggingfrom Jan 11, 2026
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
analyze_fileinto focused helper methods for parsing, unit collection, metric extraction and result construction.ReportBuilder.buildby extracting per-file analysis, per-file report assembly and summary construction to helpers for readability and testability.Description
BpsAnalyzer(_parse_file,_collect_units,_collect_bps,_build_results) and rewroteanalyze_fileto use them.CsaAnalyzer(_parse_file,_collect_module_symbols,_collect_unit_nodes,_extract_external_symbols,_build_results) and rewroteanalyze_fileaccordingly.IndirectionAnalyzer(_parse_file,_collect_function_definitions,_collect_aliases,_collect_call_graph,_calculate_indirection_depths) and refactoredanalyze_fileto use them.ReportBuilderto extract_collect_file_analysis,_build_file_reportand_build_summary, added result type imports, and addedtests/test_analyzers.pywith helper-focused tests.Testing
python -m unittest discover -s testswhich executed the tests and reportedRan 12 testswith anOKresult.python -m unittestandpython -m unittest discoverduring development; discovery run produced no tests outside thetestsdirectory and did not fail.tests/test_analyzers.pyfile contains unit tests that exercise the new helper methods for BPS, CSA, indirection and report-builder helpers and passed under the test discovery run.Codex Task