in 7c9b3e1eae8f206753457149f1b1c837f6627d6d: How to reproduce the commit on non-macos? I don’t have an apple, so I tried:
0# clang-format-16 --version
1Ubuntu clang-format version 16.0.6 (23ubuntu4)
However, the command:
0clang-format-16 -dump-config > .clang-format
produces a different result:
0# git diff -U0
1diff --git a/src/.clang-format b/src/.clang-format
2index 2f3f96ae2e..0822db5d11 100644
3--- a/src/.clang-format
4+++ b/src/.clang-format
5@@ -0,0 +1 @@
6+---
7@@ -2 +3,2 @@ Language: Cpp
8-AccessModifierOffset: -4
9+# BasedOnStyle: LLVM
10+AccessModifierOffset: -2
11@@ -29 +31 @@ AlignConsecutiveMacros:
12-AlignEscapedNewlines: Left
13+AlignEscapedNewlines: Right
14@@ -37 +39 @@ AllowShortBlocksOnASingleLine: Never
15-AllowShortCaseLabelsOnASingleLine: true
16+AllowShortCaseLabelsOnASingleLine: false
17@@ -40 +42 @@ AllowShortFunctionsOnASingleLine: All
18-AllowShortIfStatementsOnASingleLine: WithoutElse
19+AllowShortIfStatementsOnASingleLine: Never
20@@ -46 +48 @@ AlwaysBreakBeforeMultilineStrings: false
21-AlwaysBreakTemplateDeclarations: Yes
22+AlwaysBreakTemplateDeclarations: MultiLine
23@@ -54 +56 @@ BraceWrapping:
24- AfterClass: true
25+ AfterClass: false
26@@ -58 +60 @@ BraceWrapping:
27- AfterFunction: true
28+ AfterFunction: false
29@@ -61 +63 @@ BraceWrapping:
30- AfterStruct: true
31+ AfterStruct: false
32@@ -76 +78 @@ BreakBeforeConceptDeclarations: Always
33-BreakBeforeBraces: Custom
34+BreakBeforeBraces: Attach
35@@ -78 +80 @@ BreakBeforeInlineASMColon: OnlyMultiline
36-BreakBeforeTernaryOperators: false
37+BreakBeforeTernaryOperators: true
38@@ -82 +84 @@ BreakStringLiterals: true
39-ColumnLimit: 0
40+ColumnLimit: 80
41@@ -123 +125 @@ IndentRequiresClause: true
42-IndentWidth: 4
43+IndentWidth: 2
44@@ -137 +139 @@ JavaScriptWrapImports: true
45-KeepEmptyLinesAtTheStartOfBlocks: false
46+KeepEmptyLinesAtTheStartOfBlocks: true
47@@ -142 +144 @@ MacroBlockEnd: ''
48-MaxEmptyLinesToKeep: 2
49+MaxEmptyLinesToKeep: 1
50@@ -160 +162 @@ PenaltyReturnTypeOnItsOwnLine: 60
51-PointerAlignment: Left
52+PointerAlignment: Right
53@@ -208 +210 @@ SpacesInSquareBrackets: false
54-Standard: c++20
55+Standard: Latest
56@@ -222,0 +225 @@ WhitespaceSensitiveMacros:
57+
Many of these keys aren’t even listed in the documentation and the IDE shows that many are invalid since it doesn’t match the allowed schema.
How many are those? Maybe just fixing them up manually one-by-one, if they are relevant is enough?