Re: [PATCH v4 3/7] clang-format: exclude control macros from SpaceBeforeParens
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 27, 2025, 15:40 UTC
- Message-ID
- <xmqqv7l39a5c.fsf@gitster.g>
- In-Reply-To
- <20250927145049.723341-4-jltobler@gmail.com>
Justin Tobler <jltobler@gmail.com> writes:
Show 10 quoted lines
> 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> > --- > .clang-format | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-)
While this may be a welcome addition, I somehow do not think it belongs as [3/7] to this series, whose theme is about "git repo stats".
Perhaps make it a separate topic and have it graduate sooner?
Show 13 quoted lines
> diff --git a/.clang-format b/.clang-format > index dcfd0aad60..86b4fe33e5 100644 > --- a/.clang-format > +++ b/.clang-format > @@ -149,7 +149,7 @@ SpaceBeforeCaseColon: false > # f(); > # } > # } > -SpaceBeforeParens: ControlStatements > +SpaceBeforeParens: ControlStatementsExceptControlMacros > > # Don't insert spaces inside empty '()' > SpaceInEmptyParentheses: false