Skip to content

refactor: extract shared file-filtering logic from semantic analyzers #859

@Aureliolo

Description

@Aureliolo

Summary

Both AstSemanticAnalyzer.analyze and LlmSemanticAnalyzer.analyze contain identical file extension filtering and max_files slicing logic. This was partially addressed in #611 (extracted _filter_files in semantic_analyzer.py) but the LLM analyzer still has its own copy.

Finding source

Pre-PR review agents (type-design-analyzer, python-reviewer) flagged this during #611 review.

Proposed fix

Import and use the _filter_files function from semantic_analyzer.py in semantic_llm.py, or move it to a shared utility location.

Metadata

Metadata

Assignees

No one assigned

    Labels

    scope:smallLess than 1 day of worktype:refactorCode restructuring, cleanupv0.5Minor version v0.5

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions