Skip to content

fix(files): make lint result ordering deterministic - #148

Merged
luojiyin1987 merged 1 commit into
masterfrom
fix/deterministic-file-ordering
Aug 22, 2026
Merged

fix(files): make lint result ordering deterministic#148
luojiyin1987 merged 1 commit into
masterfrom
fix/deterministic-file-ordering

Conversation

@luojiyin1987

Copy link
Copy Markdown
Contributor

Closes #147

改动

loadMdFiles() 返回前对结果排序:

return [...files].sort();

此前顺序依赖 glob / filesystem traversal 顺序,跨 OS、跨文件系统或 glob 未来行为变化时,CI 日志会出现无意义的顺序变化。现在 lint report 文件顺序稳定。

测试

__tests__/symlink-security.spec.ts 新增 1 个用例:

  • 创建 b.md / a.md / c.md,断言返回 [a.md, b.md, c.md]

验证:typecheck 通过、prettier 通过、全量测试 25 suites / 203 tests 通过。

@luojiyin1987
luojiyin1987 merged commit 31aeec6 into master Aug 22, 2026
6 checks passed
@luojiyin1987
luojiyin1987 deleted the fix/deterministic-file-ordering branch August 22, 2026 03:56
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.

fix(files): make lint result ordering deterministic

1 participant