Previously when the arguments of a function wouldn't fit on a single line, clang-format would put each argument on its own line instead. By enabling the binpack parameter setting, it tried to fit as many on one line as possible instead.
Co-authored-by: Hielke Morsink <hielke.morsink@gmail.com>
- The formatting properties for JavaScript and ObjectiveC have been removed, since "Language: Cpp" is set.
- Remove CommentPragmas - its value doen't apply to our coding style.
- ForEachMacros have been replaced with entries for our own foreach loops.
- Includes age grouped together (unless there's a comment inbetween), with the 'main' include at the top, then local includes "", and finally system includes <>, with an empty line inbetween each group.
- Disable bin-packing of function arguments
- NamespaceIndentation set to 'None'.
- KeepEmptyLinesAtTheStartOfBlocks set to 'false'.
- IndentWrappedFunctionNames set to 'true'.
- Never allow short functions to be on a single line, and remove unnecessary rule for tab width since we don't use tabs.
These changes will need to be synced with OpenLoco.
This adds 3 rules that clang-format uses when ordering include files:
- common.h is assigned priority -1
- Incudes using <> is given priority 1
- Includes using "" is given priority 2
It also disables putting the "main" file first (the .h/.hpp with the
same name as the .c/.cpp"
#5074
[ci skip]