Commit Graph

19 Commits

Author SHA1 Message Date
Kacper Donat
b70b31226b All: Update formatting style 2025-11-11 13:45:27 +01:00
wmayer
b65ae56f1f 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
c469601f95 clang format SpacesBeforeTrailingComments 2023-09-12 13:02:35 -04:00
berniev
8f75442a91 restore prev setting 2023-08-11 13:14:12 +02:00
Benjamin Bræstrup Sayoc
4701ff89e0 [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
da1480d474 clang format InsertBraces true 2023-08-04 13:40:55 -04:00
wmayer
82e40835de 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
124a03f508 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
08214d9ec3 clang-format enable reflow comments 2023-02-16 09:29:51 -05:00
Uwe
2b7de83150 .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
ae1911e038 improved clang-format 2023-01-09 09:17:47 -05:00
Uwe
3c855f475d [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
70b9db569b [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
818ab2b3ff [.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
6b36ba4bf8 [.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
d7792826b4 column limit 2022-09-14 13:21:04 -05:00
berniev
05058e9708 space before initializer 2022-09-13 16:39:14 -05:00
Uwe
5048f14d60 .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
9e2ee47b01 created clang-format 2022-06-21 21:02:20 -04:00