`crates/oxc_formatter_htmlish/tests/fixtures/html/nul/` (added in
#28272) uses `nul`, a reserved device name on Windows, which breaks all
Windows jobs on main:
- `Test Windows`: `error: invalid path
'crates/oxc_formatter_htmlish/tests/fixtures/html/nul/nul-as-written.html'`
- `Test NAPI * (windows)`: `Could not find a part of the path '\\.\nul'`
while downloading the repo as a local action
Renamed the directory to `nul-byte/` and updated the `.gitattributes`
entry and the `DIVERGENCES.md` pin. The snapshot content is unchanged.
`cargo test -p oxc_formatter_htmlish` passes
(`fixtures::html::nul_byte::nul_as_written` included).
This PR was created with AI assistance (Claude Code).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
RegExp constructor source must decode to the same pattern and flags as
JavaScript string/template values. Correct escape values, continuations,
surrogate pairing, line endings, and escaped property aliases.
AI-assisted implementation.
- The header on rules_enum.rs was being stripped by accident, which was confusing for users. So I fixed that.
- Mark the generated files as generated in `.gitattributes`, for GitHub to understand the diffs are mostly pointless and can be collapsed by default (the CI job enforces that these files be up to date anyway).
- Mark the generated rule files as `merge=ours`. See https://git-scm.com/book/ms/v2/Customizing-Git-Git-Attributes for more info on what that means, but it should make the merge conflicts less problematic.
- Updated `just ready` to include the lintgen command.
- Added `cargo lintgen` to the AGENTS.md file.
AI Disclosure: Used Claude to find the reason for the lack of header comment because I had no idea why it was happening.
close: #16405
In Windows, a multiline block comment contains a `\r\n` line break. However, the printer assumes all text has no `\r` at all; see #16531. In this PR, we use `LineTerminatorSplitter` to normalize all line breaks to `\n` to solve this problem.
Introduce https://docs.github.com/en/get-started/git-basics/configuring-git-to-handle-line-endings
Without this, the `oxfmt` tests will fail because:
- The committed test fixtures use `<LF>` as the EOL character on MacOS
- There are no formatting diffs
- On Windows CI, these EOL characters are automatically converted to `<CRLF>`
- The formatter then changes these back to `<LF>`
- This difference causes the CI to fail
Initially, I tried to set it globally, but since CI failed, limited it to the minimum scope... 🫤
> https://github.com/oxc-project/oxc/pull/13803