Commit Graph

19 Commits

Author SHA1 Message Date
Kacper Donat
801174e27d All: Update formatting style 2025-11-11 13:45:27 +01:00
wmayer
32c15e28ae clang-format: disable sorting of includes
Sorting the included headers regularly leads to build failures. Especially when PCH is enabled the PreCompiled.h must be the very first include
2023-09-23 19:17:33 +02:00
wandererfan
a207d11fa4 clang format SpacesBeforeTrailingComments 2023-09-12 13:02:35 -04:00
berniev
a72bdd40bb restore prev setting 2023-08-11 13:14:12 +02:00
Benjamin Bræstrup Sayoc
630554f251 [Repo] Always break parameters and arguments
If the line is too long, parameters and arguments will now wrap on the next lines with one block indent, one arguments or parameter per line.
2023-08-06 14:39:54 -06:00
berniev
ac7dc4faf6 clang format InsertBraces true 2023-08-04 13:40:55 -04:00
wmayer
698641e075 Set BreakConstructorInitializers to BeforeComma
The initialization list will be of this form:
Class::Class()
    : var1(...)
    , var2(...)
{}

instead of
Class::Class()
    : var1(...),
      var2(...)
{}
2023-04-25 10:31:21 +02:00
berniev
5b3c5dc422 AlwaysBreakTemplateDeclarations
Previous setting was not keeping the template<...> on a line by itself which get hard to read.

Changing to Yes.
2023-02-18 03:02:47 +01:00
berniev
fb2bfe3a08 clang-format enable reflow comments 2023-02-16 09:29:51 -05:00
Uwe
5791e2307d .clang-format: revert two recent changes
- the option 'InsertBraces' might be helpful, however under MSVC it makes much more troubles as it helps: All the time the braces are either inserted in a wrong way or often only the opening brace.
Since we did not use this setting previously, this recent change can be safely reverted for now.

- the 'BeforeElse' change was obviously a mistake in the previous change. All the time we used a linebreak before an else
2023-01-20 03:24:02 +01:00
berniev
e5198ca7a1 improved clang-format 2023-01-09 09:17:47 -05:00
Uwe
65c31625f3 [skip ci] .clang-format: shorthand loops
- disallow as we did before we had this format file
2022-11-22 02:58:47 +01:00
Uwe
49c9d6ada8 [skip ci] [.clang] set pointer style to left
- since we added the .clang-format file we used Left for the pointer asterisk. It is annoying to get now all the time automatic diffs because the -clang file uses Right.
2022-11-11 05:12:47 +01:00
Uwe
0ed3e6d0fe [.clang] use line break after case
- we used in the past line breaks after a case statements to better overview. This should be kept.
2022-11-11 04:06:21 +01:00
Uwe
50347e3c18 [.clang] change a setting back to our "default"
- we used (since I am at FreeCAD) a line break after an if statement for better readability. I noticed that this rule on not in our .clang format causing unwanted diffs when using it (e.g. when coding using the Visual Studio IDE:)
2022-10-02 20:20:41 +02:00
berniev
f7c84dfd09 column limit 2022-09-14 13:21:04 -05:00
berniev
e808c88bff space before initializer 2022-09-13 16:39:14 -05:00
Uwe
17528eb1ca .clang-format: change a style
as discussed here: https://github.com/FreeCAD/FreeCAD/pull/6918#issuecomment-1186529217
2022-07-18 00:48:46 +02:00
berniev
287f3ecafe created clang-format 2022-06-21 21:02:20 -04:00