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

Update clang-format rules #4049

Open
randombit opened this issue May 11, 2024 · 0 comments
Open

Update clang-format rules #4049

randombit opened this issue May 11, 2024 · 0 comments
Labels

Comments

@randombit
Copy link
Owner

randombit commented May 11, 2024

Not going to do this anytime soon, best to wait for when things are quiet in terms of active PRs. Maybe end of the year around holidays? This is just to track/discuss possible changes. It would be best to make any such changes all at once to avoid churn.

  • Change AllowShortFunctionsOnASingleLine from Inline to Empty
  • Change AllowAllArgumentsOnNextLine from true to false
  • Change AllowAllParametersOfDeclarationOnNextLine from true to false

As with any rules based formatter, sometimes the result of any change is worse formatting vs what was before, but overall I think these would lead to more readable code.

By EOY Github Actions should have Ubuntu 24.04 available and we could consider switching from clang-format 15 to clang-format 17 at the same time.

If we are able to upgrade clang-format

  • BreakAfterAttributes = Always
  • BreakBeforeInlineAsmColon = OnlyMultiLine
@randombit randombit added the task label May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant