Skip to content

Enforce formatting in CI - #17

Merged
antstanley merged 1 commit into
mainfrom
chore/ci-format-check
Jul 26, 2026
Merged

Enforce formatting in CI#17
antstanley merged 1 commit into
mainfrom
chore/ci-format-check

Conversation

@antstanley

Copy link
Copy Markdown
Owner

Nothing checked formatting, which is how 13 files drifted from oxfmt before anyone noticed. CI is the only enforcement gate in this repo — there are no pre-commit hooks, by design — so the check belongs there.

      - run: pnpm lint
      - run: pnpm exec oxfmt --check .
      - run: pnpm knip

Grouped with lint and knip as the static-analysis steps, so build/typecheck/test still report first.

A bare . is only safe because ignorePatterns landed in #15 — before that it would have failed on 34 prose and config files. The config now scopes oxfmt to TypeScript and JavaScript and skips prose, generated files, and hand-tuned config.

Verified the step actually gates. oxfmt --check exits 1 on drift, 0 when clean. Worth proving rather than assuming: every earlier --check I ran went through a pipe, so $? was tail's exit code rather than oxfmt's — and #16 had just fixed a step that swallowed a real error behind || true. Also ran the full CI sequence locally: build, typecheck, test, lint, oxfmt, knip, all exit 0.

Added here rather than as a separate hygiene workflow. ci.yml already runs typecheck, lint, and knip on identical triggers, so a second workflow would have duplicated three of four checks and doubled time-to-signal. It would also have needed its own full pnpm build: typecheck cannot run without one, since blogwright-pds and blogwright resolve blogwright-core's types through its dist and fail with TS2307 otherwise.

DEVELOPMENT.md enumerates the CI gates in two places. Both were already stale — neither mentioned typecheck, which ci.yml has been running — so this corrects that while adding the formatter.

No changeset: CI configuration and docs, internal-only.

🤖 Generated with Claude Code

Nothing checked formatting, which is how 13 files drifted from oxfmt before
anyone noticed. CI is the only enforcement gate in this repo — there are no
pre-commit hooks by design — so the check belongs there.

A bare `.` is safe now that .oxfmtrc.json carries ignorePatterns: it covers
TypeScript and JavaScript and skips prose, generated files, and hand-tuned
config. Verified `oxfmt --check` exits 1 on drift and 0 when clean, so the
step actually gates rather than printing into the void.

Added to ci.yml rather than a separate hygiene workflow: ci.yml already runs
typecheck, lint, and knip on the same triggers, so a second workflow would
have duplicated three of the four checks and doubled the time to signal.

DEVELOPMENT.md enumerates the CI gates in two places; both were already
missing typecheck, and now list the formatter too.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@antstanley
antstanley merged commit 436a823 into main Jul 26, 2026
1 check passed
@antstanley
antstanley deleted the chore/ci-format-check branch July 26, 2026 11:49
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