Daily Backlog Burner: Add .clang-format file for C++ code formatting#7904
Merged
NikolajBjorner merged 1 commit intomasterfrom Sep 18, 2025
Merged
Conversation
This implements the enhancement requested in #1441, providing a clang-format configuration file that matches Z3's existing C++ style. Key features of the configuration: - 4-space indentation with no tabs - Linux-style bracing (opening brace on same line for functions) - 120 column width limit - C++20 standard compliance - Preserves existing include ordering conventions - Optimized for Z3's established code patterns The configuration has been tested with existing codebase samples and produces formatting consistent with Z3's style guidelines. Closes #1441 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
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
This PR implements the enhancement requested in issue #1441 by adding a
.clang-formatconfiguration file that matches Z3's existing C++ coding style patterns.Changes
.clang-format: Comprehensive clang-format configuration based on analysis of existing Z3 codebaseTesting
The configuration has been tested with existing codebase samples and produces formatting that is consistent with Z3's established style guidelines. The formatting works correctly with
clang-formatversion 18.1.3 and should work with other modern versions.Usage
Developers can now use:
clang-format <file>to format entire filesgit clang-formatto format only changed lines in patchesThis will help maintain consistent code style across contributions and reduce formatting-related review feedback.
Benefits
Closes #1441> AI-generated content by Daily Backlog Burner may contain mistakes.