ci: bump clang-format 14 → 20 and reformat#4990
Closed
matthargett wants to merge 2 commits into
Closed
Conversation
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.
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. |
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.
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
ci/coding_guidelines_check.pyandci/pre_commit_hook_samplepin clang-format-20;coding_guidelines.ymlinstalls it fromapt.llvm.orgfor 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/-14mix..clang-format's version note is updated (it also fixes theclang-formttypo).clang-format-20 -iover 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-formatneeded 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-tidywildcards 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.