Skip to content

fix(lint): ignore CRLF in shipped driver comparisons - #1942

Open
soyorin33 wants to merge 1 commit into
Tencent:mainfrom
soyorin33:fix/driver-docs-crlf
Open

soyorin33 wants to merge 1 commit into
Tencent:mainfrom
soyorin33:fix/driver-docs-crlf

Conversation

@soyorin33

Copy link
Copy Markdown

Summary

On a Windows checkout, node scripts/check-docs.mjs reports that the Paseo, sandbox and T3 guide examples differ from the shipped driver definitions even when their contents match. Markdown is already normalized to LF by readMarkdown, but the YAML source retains CRLF.

Normalize CRLF in the English source comparison. Keep the exact-content check, and the existing semantic YAML comparison for translated guides.

Type of Change

  • Bug fix (documentation lint)

Test Plan

Native Windows, Node 22.19.0, based on df433c61.

  • Regression first: the LF case passed and the CRLF case failed on the original code with the three driver-guide mismatches.
  • Both new parameterized cases pass after the fix. They also allow a translated YAML comment and reject actual max_parallel changes in both English and Chinese examples.
  • node scripts/check-docs.mjs — passed, replacing the three baseline mismatches.
  • npm run typecheck, type-aware oxlint on both changed files, and git diff --check — passed.
  • node node_modules/vitest/vitest.mjs run scripts/check-docs.test.ts --retry 0 — 28 passed, 5 failed. All five failures reproduce on unmodified main on this host: one existing runtime-options fixture and two DriverCan fixtures assume LF, and two skill-command assertions assume forward-slash output paths.
  • Full type-aware oxlint reports the same 26 baseline Windows family-facts diagnostics (fix(lint): resolve family facts imports on Windows #1927).

POSIX execution is left to CI; the tests explicitly write both LF and CRLF, regardless of the host checkout convention.

Notes for Reviewers

The implementation is one comparison-line change plus its command-level regressions. It changes the documentation lint check, with no product runtime code or generated documentation changes. Tools, drivers, scopes, team modes, checkout layouts, resource delivery and run state do not affect this text comparison.

Prepared with Codex assistance for discovery, implementation, verification, and this description.

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.

2 participants