Skip to content

fix(parse): recognize .cc files during directory import#1008

Merged
yangxinxin-7 merged 1 commit into
mainfrom
fix/cc-directory-scan
Mar 26, 2026
Merged

fix(parse): recognize .cc files during directory import#1008
yangxinxin-7 merged 1 commit into
mainfrom
fix/cc-directory-scan

Conversation

@qin-ctx

@qin-ctx qin-ctx commented Mar 26, 2026

Copy link
Copy Markdown
Collaborator

Description

Fix directory imports misclassifying .cc files as unsupported. This keeps C++ source trees processable during pre-scan and aligns directory scanning with the existing AST extractor language mapping.

Related Issue

Related to #1007

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Performance improvement
  • Test update

Changes Made

  • add .cc to the directory scan text/code extension allowlist
  • extend directory scan coverage to assert .cc files are classified as processable
  • extend parser routing coverage to keep .cc on the text-fallback path

Testing

  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have tested this on the following platforms:
    • Linux
    • macOS
    • Windows

Commands run:

  • python -m pytest -q -o addopts='' tests/parse/test_directory_scan.py
  • python -m pytest -q -o addopts='' tests/parse/test_directory_parser_routing.py

Checklist

  • My code follows the project's coding style
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

Screenshots (if applicable)

N/A

Additional Notes

The local commit used --no-verify because the current environment is missing the pre_commit Python module required by the repository hook.

Keep C++ source files from being rejected as unsupported during directory imports, and add regression coverage for scan classification and parser routing.
@github-actions

Copy link
Copy Markdown

Failed to generate code suggestions for PR

@yangxinxin-7 yangxinxin-7 merged commit f0689e1 into main Mar 26, 2026
6 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in OpenViking project Mar 26, 2026
@yangxinxin-7 yangxinxin-7 deleted the fix/cc-directory-scan branch March 26, 2026 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants