-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
ci: enhance format check to block unformatted code in PRs #21801
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Update format:check:changed to check all files in PR (origin/main...HEAD) instead of just last commit (HEAD~1) - Add format:check script for checking all files - Update CI workflow to fetch full git history and main branch for proper comparison - Ensures unformatted code is caught and blocks PR merges
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, I'll close mine ✅
225bb62
Resolves parser error for .feature files in format:check
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
|
Force-merge used because it was imperative to get this in before other PRs to prevent additional formatting errors on |


Description
This PR enhances the format checking in CI to properly block unformatted code from being merged.
Changes:
format:checkscript for checking all files on the branchWhy:
The previous implementation only checked files in the last commit, which could allow unformatted code in earlier commits of a PR to slip through. This change ensures all files in the PR are checked.
CHANGELOG entry: null
Related issues
N/A
Manual testing steps
This change affects CI behavior. To test:
format:check:changedjob fails if any file is unformattedScreenshots/Recordings
N/A - CI configuration change
Pre-merge author checklist
Pre-merge reviewer checklist
Note
CI now runs
yarn format:checkacross the repo;package.jsonformatting scripts updated to cover js/ts/tsx/json and add a full-repo check.format:check:changedwithformat:checkin.github/workflows/ci.ymlmatrix to enforce full-repo formatting checks.package.json):format:checkscript and use it in CI.format/format:checkglobs to**/*.{js,ts,tsx,json}.format:check:changedto match the same file set.Written by Cursor Bugbot for commit 599b525. This will update automatically on new commits. Configure here.