Skip to content

fix: fail CI when rules.json drifts from the CLI catalogue - #339

Open
MaximeGaudin wants to merge 1 commit into
mainfrom
fix/issue-186-rules-sync-check
Open

fix: fail CI when rules.json drifts from the CLI catalogue#339
MaximeGaudin wants to merge 1 commit into
mainfrom
fix/issue-186-rules-sync-check

Conversation

@MaximeGaudin

Copy link
Copy Markdown
Owner

Summary

  • apps/docs/src/data/rules.json is hand-synced from the CLI via pnpm sync:docs, and nothing in CI verified it stayed in sync — a rule edit without a re-sync would publish wrong docs.
  • Added a rules-sync CI job: builds the CLI, runs slint rules --json, and diffs the output against the committed rules.json, failing with a pointer to pnpm sync:docs on drift.

Verified both directions locally: the CLI's --json output is currently byte-identical to the committed file (the job passes), and a one-character edit to rules.json is caught by the diff (the job fails with the sync hint).

Fixes #186

Test plan

  • In-sync case: cargo run -q -p slint-cli -- rules --json output diffs clean against the committed file.
  • Out-of-sync case: simulated drift fails the diff as intended.
  • CI green on the PR

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.

No CI check that apps/docs/src/data/rules.json stays in sync with the CLI's rule catalogue

1 participant