Skip to content

Commit 1cf4e97

Browse files
authored
Add .clang-format configuration file. (openscad#5309)
Configured, so that it is similar to what uncrustify would produce, but applyig it will still be a massive change, so there needs to be a large scale submit once.
1 parent 01c7228 commit 1cf4e97

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.clang-format

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Some set of config values, then refined below
2+
BasedOnStyle: Google
3+
4+
ColumnLimit: 105
5+
ContinuationIndentWidth: 2
6+
ConstructorInitializerIndentWidth: 2
7+
8+
# public:, private: in classes: no indent
9+
AccessModifierOffset: -2
10+
11+
# case on same level as switch
12+
IndentCaseLabels: false
13+
AllowShortCaseLabelsOnASingleLine: true
14+
AlignConsecutiveShortCaseStatements:
15+
Enabled: true
16+
AcrossEmptyLines: true
17+
AcrossComments: true
18+
AlignCaseColons: false
19+
20+
# Always align pointer * and reference & to the right.
21+
DerivePointerAlignment: false
22+
PointerAlignment: Right
23+
ReferenceAlignment: Left
24+
25+
# To be enabled later:
26+
# * once all misc-include-cleaner are addressed an no accidental inclusion
27+
# order needed.
28+
# * Some CGAL inclusion order has been figuured out.
29+
SortIncludes: false
30+
31+
# Braces on newline in functions, classes and namespaces.
32+
BreakBeforeBraces: Custom
33+
BraceWrapping:
34+
AfterClass: true
35+
AfterFunction: true
36+
37+
AllowShortIfStatementsOnASingleLine: AllIfsAndElse

0 commit comments

Comments
 (0)