Skip to content
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

Use of deprecated ConstructorInitializerAllOnOneLineOrOnePerLine .clang-format option #169

Open
huand opened this issue Mar 31, 2023 · 3 comments

Comments

@huand
Copy link

huand commented Mar 31, 2023

ConstructorInitializerAllOnOneLineOrOnePerLine: 'true'

Documentation says it's deprecated

I think what you want is

BinPackParameters: false
BinPackArguments: false
@ClausKlein
Copy link
Contributor

@huand
Copy link
Author

huand commented Apr 2, 2023

Possibly, I'm not well versed in the "most commonly admitted consensual .clang-format practices" so I'll let the decision to others. I was just looking through the definitions and I saw something deprecated which is not the best default i believe for a modern starter.

As a digression I went through the options because originally i wanted to have the & "on the left" for function definitions like auto fn(const Type& x) instead of auto fn(const Type &x) and i believe this .clang-format does not enforce this as it is

DerivePointerAlignment: false
PointerAlignment: Left

I also don't know if this "left alignment" is a standard practice.

@TheLartians
Copy link
Owner

Thanks for the heads up! I wasn't aware that the option was deprecated. Happy to accept a PR that updates the config without impacting the other style settings much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants