]> git.ipfire.org Git - thirdparty/git.git/commitdiff
clang-format: exclude control macros from SpaceBeforeParens
authorJustin Tobler <jltobler@gmail.com>
Sat, 27 Sep 2025 14:50:45 +0000 (09:50 -0500)
committerJunio C Hamano <gitster@pobox.com>
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 <karthik.188@gmail.com>
Signed-off-by: Justin Tobler <jltobler@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
.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