[clang-format] Feature request: do not remove line breaks in function arguments declaration
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
This is vaguely related to #50393.
I would like to have an option (I guess it could be a new value in `BinPackArguments` and `BinPackParameters`), that would respect the existing line breaks, and only add new line breaks if the column limit is exceeded. Example:
```
// unformatted code
set_properties(object,
"name", name,
"age", 20);
// desired formatting
set_properties(object,
"name", name,
"age", 20);
```
Same in function declarations:
```
// unformatted code
void my_function_with_a_long_name_but_please_keep_the_line_breaks(int arg1, int arg2, int arg3,
int arg4, int arg5,
int arg6, int arg7)
{ ....
// desired formatting
void my_function_with_a_long_name_but_please_keep_the_line_breaks(
int arg1, int arg2, int arg3,
int arg4, int arg5,
int arg6, int arg7)
{ ....
```
Contributor guide
Assessment
This issue has not been assessed yet.