Skip to content

0.2.0

Choose a tag to compare

@github-actions github-actions released this 14 Aug 21:09
· 2 commits to main since this release
Make check-contract line-ending agnostic

v0.2.0 failed twice in CI at `npm run check`, green every time locally.

The gate split source on '\n' alone, so on a CRLF file every line carried a
trailing '\r' and each `$`-anchored rule silently stopped matching. The
exemption shapes were the first casualty: `model.ts`'s three TitleSpec and
SubtitleStyle default colours stopped being recognised as the video-pixel
literals they are, and were reported as hardcoded interface colour — plus a
stale-exemption error for a count that had never changed.

It could only ever fail on a clean machine. This working tree is LF; every
fresh checkout on Windows, including the runner, is CRLF.

Reproduced by cloning the tag and running the gate:

    contract: 4 problems across 129 files
      hardcoded-colour (3)   src/types/model.ts:238 color: '#ffffff', ...
      stale-exemption (1)    exempted for 0 colour literal(s), not 3

Converting that same file to LF made it pass, which is the whole diagnosis.

Fixed at the read rather than in each rule — splitting on /\r?\n/ means no
line ever carries a '\r' and no rule needs to know the difference. Checked the
other twelve gates for the same shape; none of them split raw newlines.