Skip to content

Improve clang-format handling for macros and enums #3432

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 23, 2025

Conversation

szymon-czapracki
Copy link
Contributor

This PR includes two formatting-related changes to .clang-format and supporting tooling:

  1. Fix formatting for STATS macros
    Updated MacroBlockBegin, MacroBlockEnd, and StatementMacros settings to properly handle macro blocks like STATS_NAME_START / STATS_NAME_END.

  2. Disable line breaking after enums
    Changed BraceWrapping.AfterEnum to false to align with the existing code style and prevent unnecessary newlines after enum declarations.

This change prevents `clang-format` from enforcing
a newline after enum declarations
Refined `MacroBlockBegin` and `MacroBlockEnd`
to include `STATS_SECT_START` and `STATS_SECT_END`.
Removed `STATS_NAME_START` and `STATS_NAME_END` from `StatementMacros`.
@sjanc sjanc merged commit d01f4a0 into apache:master Jun 23, 2025
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants