ci: extract fmt check into parallel job, add fmt:check mise task - #305
Merged
Conversation
Moves dart format and prettier checks out of the test job into a dedicated fmt job that runs in parallel with test. build-web and build-android now require both test and fmt to pass. Adds dart:format:check, prettier:check, and fmt:check tasks to mise.toml so developers can run the same check locally before pushing without triggering code generation.
Adds shfmt -d check to the fmt CI job so shell formatting is enforced consistently with local dev. Uses the same flags as the local shell:format task (-i 0 -ci). Adds mise-tasks/shell/format-check.sh (shell:format:check task) and includes it in fmt:check depends so developers can run the full check locally with ./bin/mise run fmt:check.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR refactors CI to run formatting checks in a dedicated fmt job (parallel to test) and adds corresponding local mise tasks so developers can run the same checks before pushing.
Changes:
- Added
dart:format:check,prettier:check, andfmt:checktasks inmise.toml. - Introduced a shell formatting check file-task using
shfmt. - Updated CI to run formatting in a new parallel
fmtjob and requirefmt+testbeforebuild-web/build-android.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| mise.toml | Adds formatting “check” tasks and an aggregate fmt:check task. |
| mise-tasks/shell/format-check.sh | Adds a shfmt-based shell formatting check task. |
| .github/workflows/ci.yml | Splits formatting checks into a parallel fmt job and updates build job dependencies. |
|
|
||
| [tasks."fmt:check"] | ||
| description = "Check all code formatting (Dart, JS/TS, shell) — fails if any file needs reformatting" | ||
| depends = ['dart:format:check', 'prettier:check', 'shell:format:check'] |
Comment on lines
+77
to
+78
| curl -sSL "https://github.com/mvdan/sh/releases/download/v3.8.0/shfmt_v3.8.0_linux_amd64" -o /usr/local/bin/shfmt | ||
| chmod +x /usr/local/bin/shfmt |
Comment on lines
+69
to
+74
| - name: Setup Node.js | ||
| uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: '22' | ||
| cache: 'npm' | ||
|
|
File-tasks use hyphens in their name (shell:format-check), not colons.
Without pub get, .dart_tool/package_config.json is absent and dart format falls back to the SDK language version rather than the package language version, producing different output for trailing-comma style.
Contributor
🚀 Cloudflare Pages PreviewYour preview deployment is ready! Preview URL: https://claude-ci-fmt-check-phase-0c.staging-cambeerfestival.pages.dev This preview will be automatically updated when you push new commits to this PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Moves dart format and prettier checks out of the test job into a
dedicated fmt job that runs in parallel with test. build-web and
build-android now require both test and fmt to pass.
Adds dart:format:check, prettier:check, and fmt:check tasks to
mise.toml so developers can run the same check locally before pushing
without triggering code generation.