Skip to content

Move ast scan tests to own file - #12

Merged
mstdokumaci merged 2 commits into
mainfrom
reorg-tests
Aug 5, 2026
Merged

mstdokumaci merged 2 commits into
mainfrom
reorg-tests

Conversation

@mstdokumaci

@mstdokumaci mstdokumaci commented Aug 5, 2026 •

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • Bug Fixes

    • Improved import scanning accuracy, including aliases, chained paths, escaped paths, sorting, and import-block boundaries.
    • Excluded invalid and nested imports from analysis.
  • Refactor

    • Internalized implementation details and compatibility declarations, reducing the public API surface.
  • Tests

    • Added comprehensive coverage for AST scanning and import classification.
    • Updated existing tests to use the current import-analysis behavior.

Repository owner deleted a comment from coderabbitai Bot Aug 5, 2026
@coderabbitai

coderabbitai Bot commented Aug 5, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c119e9d1-4fce-4b80-bcf9-e3f625822d39

📥 Commits

Reviewing files that changed from the base of the PR and between 1e953d1 and a0dde33.

📒 Files selected for processing (6)
  • build.zig
  • src/ast_scan.zig
  • src/ast_scan_test.zig
  • src/compat.zig
  • src/zsort.zig
  • src/zsort_test.zig

📝 Walkthrough

Walkthrough

The change internalizes implementation exports, adds comprehensive AST scanner tests, updates zsort tests to use ast_scan, and adds the AST scanner test target to the test and check build steps.

Changes

AST scanner API and validation

Layer / File(s) Summary
Internalize implementation exports
src/ast_scan.zig, src/zsort.zig, src/compat.zig
AST scanner helpers, zsort implementation declarations, and selected compatibility aliases are no longer publicly exported.
Cover AST scanning and update consumers
src/ast_scan_test.zig, src/zsort_test.zig
New tests cover import classification, boundaries, aliases, paths, sorting, and invalid imports. Existing zsort tests now use ast_scan APIs and constants.
Wire AST scanner tests into the build
build.zig
The AST scanner test target runs with the test step and compiles with the check step.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main change of moving AST scan tests into a separate file.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch reorg-tests

Comment @coderabbitai help to get the list of available commands.

@mstdokumaci
mstdokumaci merged commit aaef36c into main Aug 5, 2026
11 checks passed
@mstdokumaci
mstdokumaci deleted the reorg-tests branch August 5, 2026 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant