-
Notifications
You must be signed in to change notification settings - Fork 28
Labels
enhancementNew feature or requestNew feature or request
Description
Description:
Currently, the tool allows users to select Tree-sitter as an analysis backend through the core module. However, to streamline the architecture and encapsulate implementation details, Tree-sitter should be moved to a commons
module. This refactoring will allow the tool to leverage Tree-sitter's functionalities internally without exposing it as a configurable option at the core level.
Additionally, CodeQL will be removed and therefore there is no longer a need to expose tree-sitter this way.
Acceptance Criteria:
- Tree-sitter is moved to a
commons
module, encapsulating all Tree-sitter-related logic. - The core module no longer exposes Tree-sitter as a selectable analysis backend.
- Update all relevant documentation and code examples to reflect these changes.
Current Code (Before):
if self.analysis_backend in [AnalysisEngine.CODEQL, AnalysisEngine.TREESITTER]:
# Perform analysis
Proposed Code (After):
from cldk.analysis.commons.treesitter import TreeSitterEngine
# Tree-sitter is now the fallback backend, no need for conditional checks
Steps to Implement:
- Create a
commons
module to house the Tree-sitter engine and related utilities. - Refactor the core module to remove references to Tree-sitter as an exposed option.
- Update the initialization logic to use Tree-sitter as the default backend.
- Update documentation to reflect these structural changes.
Benefits:
- Simplifies the core module by reducing unnecessary exposure of backend configurations.
- Improves maintainability by isolating Tree-sitter-specific logic.
Environment:
- OS: Fedora 41
- Java Version: 21
- Tool Version: 0.4.0 (and lower)
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request