Skip to content

Commit 42bb19d

Browse files
authored
chore: add .clang-format based on the style 4J seemed to use (#30) (#273)
The style 4J used seems to be based on the Microsoft style (presumably the default settings of whatever Visual Studio they used to write this). However, the source files do not have much consistency so I highly doubt 4J cared too much about styling, just going with whatever happened to be the default. This style is therefore basically the Microsoft style (4-space indents, C#/Allman style braces) with some settings set based on my observations about the code. Fixes: #30
1 parent 1444581 commit 42bb19d

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

.clang-format

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
BasedOnStyle: Microsoft
3+
AccessModifierOffset: -2
4+
BraceWrapping:
5+
AfterCaseLabel: false
6+
AfterClass: true
7+
AfterControlStatement: Always
8+
AfterEnum: true
9+
AfterExternBlock: true
10+
AfterFunction: true
11+
AfterNamespace: true
12+
AfterObjCDeclaration: true
13+
AfterStruct: true
14+
AfterUnion: false
15+
BeforeCatch: true
16+
BeforeElse: true
17+
BeforeLambdaBody: false
18+
BeforeWhile: false
19+
IndentBraces: false
20+
SplitEmptyFunction: true
21+
SplitEmptyRecord: true
22+
SplitEmptyNamespace: true
23+
ColumnLimit: 0
24+
IncludeBlocks: Preserve
25+
IndentAccessModifiers: false
26+
IndentCaseBlocks: true
27+
IndentCaseLabels: false
28+
IndentExportBlock: true
29+
IndentExternBlock: AfterExternBlock
30+
IndentGotoLabels: false
31+
IndentPPDirectives: None
32+
IndentWidth: 4
33+
InsertBraces: true
34+
InsertNewlineAtEOF: true
35+
NamespaceIndentation: None
36+
PointerAlignment: Right
37+
RemoveParentheses: Leave
38+
RemoveSemicolon: false
39+
SeparateDefinitionBlocks: Leave
40+
ShortNamespaceLines: 1
41+
SkipMacroDefinitionBody: false
42+
SortIncludes:
43+
Enabled: true
44+
IgnoreCase: false
45+
SpacesInParens: Never
46+
SpacesInParensOptions:
47+
ExceptDoubleParentheses: false
48+
InCStyleCasts: false
49+
InConditionalStatements: false
50+
InEmptyParentheses: false
51+
Other: false
52+
SpacesInSquareBrackets: false
53+
Standard: Latest
54+
TabWidth: 4
55+
UseTab: Never

0 commit comments

Comments
 (0)