style: add clang-format config and reformat C++ sources#1230
Open
msluszniak wants to merge 1 commit into
Open
Conversation
Replaces the implicit default LLVM style (which aggressively wrapped function signatures, chained ternaries and string concatenations) with a custom .clang-format: LLVM base, ColumnLimit 100, Standard c++20 and InsertNewlineAtEOF. A .clang-format-ignore excludes the vendored libraries (ada, pfft, runner) and the generated ErrorCodes.h, and is picked up automatically by the existing clang-format pre-commit hook. Reformats all first-party C/C++/Objective-C sources accordingly. Closes #1217
chmjkb
approved these changes
Jun 15, 2026
chmjkb
left a comment
Collaborator
There was a problem hiding this comment.
configuration looks good!
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.
Description
Replaces the implicit default LLVM style (which aggressively wrapped function signatures, chained ternaries and string concatenations) with a custom
.clang-format: LLVM base,ColumnLimit: 100,Standard: c++20andInsertNewlineAtEOF. A.clang-format-ignoreexcludes the vendored libraries (ada,pfft,runner) and the generatedErrorCodes.h, and is picked up automatically by the existing clang-format pre-commit hook (nolefthook.ymlchange needed). All first-party C/C++/Objective-C sources are reformatted accordingly — the diff is whitespace-only.Introduces a breaking change?
Type of change
Tested on
Testing instructions
Whitespace-only change (clang-format never alters tokens). Re-running
clang-formatover the tree produces no further diff (idempotent), and vendored/generated files are left untouched.Screenshots
Related issues
Closes #1217
Checklist
Additional notes
This is a large but mechanical diff; in-flight C++ branches should rebase onto it to avoid conflicts.