]> git.99rst.org Git - git.git/commitdiff
clang-format: exclude control macros from SpaceBeforeParens
authorJustin Tobler <redacted>
Sat, 27 Sep 2025 14:50:45 +0000 (09:50 -0500)
committerJunio C Hamano <redacted>
Sun, 28 Sep 2025 15:37:23 +0000 (08:37 -0700)
The formatter currently suggests adding a space between a control macro
and parentheses. In the Git project, this is not typically expected. Set
`SpaceBeforeParens` to `ControlStatementsExceptControlMacros`
accordingly.

Helped-by: Karthik Nayak <redacted>
Signed-off-by: Justin Tobler <redacted>
Signed-off-by: Junio C Hamano <redacted>
.clang-format

index dcfd0aad60c31e507989efac53be45f46ef4a9bf..86b4fe33e5cd98e2a347944559c345419824c245 100644 (file)
@@ -149,7 +149,7 @@ SpaceBeforeCaseColon: false
 #     f();
 #   }
 # }
-SpaceBeforeParens: ControlStatements
+SpaceBeforeParens: ControlStatementsExceptControlMacros
 
 # Don't insert spaces inside empty '()'
 SpaceInEmptyParentheses: false
git clone https://git.99rst.org/PROJECT