Skip to content

fix(sloplint): deduplicate directory symlinks before recursion - #103

Open
xunguangzlj-cloud wants to merge 2 commits into
Nutlope:mainfrom
xunguangzlj-cloud:fix/sloplint-symlink-cycles
Open

xunguangzlj-cloud wants to merge 2 commits into
Nutlope:mainfrom
xunguangzlj-cloud:fix/sloplint-symlink-cycles

Conversation

@xunguangzlj-cloud

@xunguangzlj-cloud xunguangzlj-cloud commented Oct 28, 2026 •

Copy link
Copy Markdown

Linting a project containing a symlink to an ancestor repeatedly traverses the same directories. Multiple directory aliases also cause the same CSS file to be checked more than once, because collection only deduplicates file path strings.

Track visited directories and files by realpath before descending. Valid external directory links remain supported, and reports keep the first discovered path. No dependencies or lint rules change.

Add a regression to the existing refcheck runner that invokes the real CLI on a project with a parent cycle and two links to one shared directory. It must finish and report exactly one file. The fixture uses junctions on Windows and directory symlinks elsewhere, with a five-second subprocess timeout.

Validation:

  • With the original collector, refcheck fails only the new symlink fixture; with the fix, it is clean across 101 reference files.
  • All 50 themes validate; regenerating the index leaves no diff.
  • git diff --check passes.
  • Re-ran refcheck after updating the fixture wording to match the project's English conventions.

Local verification used Windows and Node.js 24.16.0. Cross-platform hosted checks are pending. Vercel requires Together AI team authorization for this external contribution; that deployment gate is separate from local validation. Prepared with AI assistance; maintainer review and merge remain pending.

@vercel

vercel Bot commented Oct 28, 2026

Copy link
Copy Markdown

@xunguangzlj-cloud is attempting to deploy a commit to the Together AI Team on Vercel.

A member of the Team first needs to authorize it.

@xunguangzlj-cloud xunguangzlj-cloud changed the title fix: 避免 sloplint 重复扫描符号链接目录环 fix(sloplint): deduplicate directory symlinks before recursion Oct 28, 2026

This branch has not been deployed

No deployments
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