Skip to content

ci: bump clang-format 14 → 20 and reformat#4990

Closed
matthargett wants to merge 2 commits into
bytecodealliance:mainfrom
rebeckerspecialties:ci/clang-format-20
Closed

ci: bump clang-format 14 → 20 and reformat#4990
matthargett wants to merge 2 commits into
bytecodealliance:mainfrom
rebeckerspecialties:ci/clang-format-20

Conversation

@matthargett

Copy link
Copy Markdown
Contributor

Summary

Bumps the coding-guidelines formatter from clang-format-14 to clang-format-20 and reformats the tree to match. This is the clang-format half of #4983's tooling modernization; the clang-tidy bump and the runner / native-LLVM parts follow separately.

What changed

  • Commit 1 (config): ci/coding_guidelines_check.py and ci/pre_commit_hook_sample pin clang-format-20; coding_guidelines.yml installs it from apt.llvm.org for the running Ubuntu release (it isn't preinstalled), so the pinned version no longer drifts with the runner image — the rot behind today's -12/-14 mix. .clang-format's version note is updated (it also fixes the clang-formt typo).
  • Commit 2 (reformat): mechanical clang-format-20 -i over the coding-guidelines-checked sources, as a standalone commit for easy review.

Noise: small

Only 42 of 441 files (~209 lines) change — the code was already close to the clang-format-20 style, and .clang-format needed no option changes (zero config warnings at 20). The reformat is also version-flat: 39 files at clang-format-18, 43 at 21/22, so pinning 20 carries no penalty over the runner-preinstalled 18 while being an explicitly-pinned latest stable.

Scope

Intentionally just clang-format. The clang-tidy bump to 20 is separate: at 20 the current .clang-tidy wildcards surface ~3,300 diagnostics on the tree (53% misc-include-cleaner), which needs config curation plus incremental cleanup — a follow-up tied to #4982, not bundled here.

clang-format 20 replaces the 14 pinned in coding_guidelines_check.py and
the pre-commit sample, installed from apt.llvm.org (so the pinned version
no longer drifts with the runner image). Updates the .clang-format
version note to match. The tree is reformatted to clang-format-20 in the
following commit.
Mechanical `clang-format-20 -i` over the coding-guidelines-checked
sources. Small (~40 files) because the codebase was already close to the
clang-format-20 style; done as a standalone commit for easy review.
@matthargett

Copy link
Copy Markdown
Contributor Author

Superseded by #4991 — switched to ubuntu-24.04's preinstalled clang-format-18 (no external download) instead of installing clang-format-20 from apt.llvm.org.

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.

1 participant