clang-format change: one arg per line for long function call/def #1126
+2,851
−1,633
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Change clang-format config so that long function call/def will have each argument taking a new line, with brackets in their own lines.
The current formatter breaks only when a line is filled, causing multiple parameters sharing the same line, which creates walls of code that are not easy to read. This should mitigate the issue.
Drawback: A few super long template from
ac_math.h
looks bad now, but as they are not that much better before I guess it's a reasonable tradeoff...Example:
Current:
Modified:
Type of change
For a new feature or function, please create an issue first to discuss it
with us before submitting a pull request.
Note: Please delete options that are not relevant.
Tests
Test Configuration:
Checklist
pre-commit
on the files I edited or added.