Skip to content

Stabilize pre-commit clang-format by pinning toolchain in hook config#310

Merged
2194555 merged 2 commits into
masterfrom
copilot/fix-precommit-failure
Jun 6, 2026
Merged

Stabilize pre-commit clang-format by pinning toolchain in hook config#310
2194555 merged 2 commits into
masterfrom
copilot/fix-precommit-failure

Conversation

Copilot AI commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

The pre-commit GitHub Actions job was failing on clang-format due to environment-dependent formatter behavior. This change removes runner/toolchain drift by making pre-commit own and pin the formatter version.

  • Root issue

    • clang-format ran via a local system hook, so CI behavior depended on whatever version apt resolved on the runner.
    • This caused formatting deltas in CI (files were modified by this hook) even when local checks appeared clean.
  • What changed

    • Pinned clang-format in pre-commit
      • Replaced the local language: system clang-format hook with pre-commit/mirrors-clang-format at v14.0.6.
      • Kept -fallback-style=none behavior.
    • Simplified CI workflow
      • Removed explicit apt install clang-format from .github/workflows/format.yml.
      • Workflow now relies on the pinned pre-commit-managed formatter.
  • Config shape after change

    - repo: https://github.com/pre-commit/mirrors-clang-format
      rev: v14.0.6
      hooks:
        - id: clang-format
          args: ["-fallback-style=none"]

@netlify

netlify Bot commented Jun 6, 2026

Copy link
Copy Markdown

Deploy Preview for rm-control ready!

Name Link
🔨 Latest commit f8320f6
🔍 Latest deploy log https://app.netlify.com/projects/rm-control/deploys/6a23d7bcc81f8f0008cb99e2
😎 Deploy Preview https://deploy-preview-310--rm-control.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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
Copilot AI requested a review from 2194555 June 6, 2026 08:18
@2194555 2194555 marked this pull request as ready for review June 6, 2026 08:26
Copilot AI review requested due to automatic review settings June 6, 2026 08:26
@2194555 2194555 merged commit 7fcd163 into master Jun 6, 2026
10 checks passed
@2194555 2194555 deleted the copilot/fix-precommit-failure branch June 6, 2026 08:28

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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: system clang-format hook with pre-commit/mirrors-clang-format pinned to v14.0.6.
  • Removes the GitHub Actions step that installed clang-format via apt, 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.

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.

3 participants