Stabilize pre-commit clang-format by pinning toolchain in hook config#310
Merged
Conversation
✅ Deploy Preview for rm-control ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Copilot
AI
changed the title
[WIP] Fix failing GitHub Actions job pre-commit
Stabilize pre-commit clang-format by pinning toolchain in hook config
Jun 6, 2026
2194555
approved these changes
Jun 6, 2026
There was a problem hiding this comment.
Pull request overview
This PR stabilizes the repository’s formatting checks by moving clang-format from a runner-dependent system install to a pre-commit-managed, pinned version, ensuring consistent formatting results across local runs and CI.
Changes:
- Replaces the local
language: systemclang-format hook withpre-commit/mirrors-clang-formatpinned tov14.0.6. - Removes the GitHub Actions step that installed
clang-formatviaapt, relying on pre-commit to provide the formatter.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
.pre-commit-config.yaml |
Pins clang-format via pre-commit/mirrors-clang-format@v14.0.6 and keeps -fallback-style=none. |
.github/workflows/format.yml |
Simplifies CI by removing the apt install clang-format step and running pre-commit directly. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
The
pre-commitGitHub Actions job was failing onclang-formatdue to environment-dependent formatter behavior. This change removes runner/toolchain drift by making pre-commit own and pin the formatter version.Root issue
clang-formatran via a local system hook, so CI behavior depended on whatever version apt resolved on the runner.files were modified by this hook) even when local checks appeared clean.What changed
language: systemclang-format hook withpre-commit/mirrors-clang-formatatv14.0.6.-fallback-style=nonebehavior.apt install clang-formatfrom.github/workflows/format.yml.Config shape after change