Skip to content

Commit 4794c0f

Browse files
author
ma5ter
committed
.clang-format updated to the current syntax according to the https://clang.llvm.org/docs/ClangFormatStyleOptions.html additionally schema override for CLion added as .clang-format.json to reflect changes from https://github.com/elfmz/llvm-project repo
1 parent 49ff9c1 commit 4794c0f

File tree

2 files changed

+70
-6
lines changed

2 files changed

+70
-6
lines changed

.clang-format

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,22 @@ IndentWidth: 4
44
TabWidth: 4
55
Language: Cpp
66
Standard: Latest
7-
SortIncludes: false
7+
SortIncludes: Never
88

99
AccessModifierOffset: -4
1010
AlignAfterOpenBracket: DontAlign
11-
AlignConsecutiveAssignments: false
12-
AlignConsecutiveDeclarations: false
13-
AlignConsecutiveBitFields: true
14-
AlignConsecutiveMacros: true
11+
AlignConsecutiveAssignments:
12+
Enabled: false
13+
AlignConsecutiveDeclarations:
14+
Enabled: false
15+
AlignConsecutiveBitFields:
16+
Enabled: true
17+
AcrossEmptyLines: true
18+
AcrossComments: true
19+
AlignConsecutiveMacros:
20+
Enabled: true
21+
AcrossEmptyLines: true
22+
AcrossComments: true
1523
AllowAllArgumentsOnNextLine: false
1624
AllowShortFunctionsOnASingleLine: Inline
1725
AllowShortLambdasOnASingleLine: Empty
@@ -25,7 +33,7 @@ IndentCaseLabels: true
2533
BreakBeforeBraces: Custom
2634
BraceWrapping:
2735
AfterClass: true
28-
AfterControlStatement: false
36+
AfterControlStatement: Never
2937
AfterEnum: true
3038
AfterFunction: true
3139
AfterNamespace: true

.clang-format.json

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$id": "far2l-clang-format",
4+
"title": "ClangFormat Options for far2l",
5+
"allOf": [
6+
{
7+
"$ref": "http://jetbrains.com/schema/clangformat.json"
8+
}
9+
],
10+
"properties": {
11+
"UseTab": {
12+
"title": "The way to use tab characters in the resulting file.",
13+
"x-intellij-html-description": "Modified to match https://github.com/elfmz/llvm-project",
14+
"enum": [
15+
"Never",
16+
"ForIndentation",
17+
"ForContinuationAndIndentation",
18+
"AlignWithSpaces",
19+
"Always",
20+
"ForContinuationAndIndentationAndComments"
21+
],
22+
"type": "string"
23+
},
24+
"AlignByTab": {
25+
"title": "Align by tab.",
26+
"x-intellij-html-description": "Added to match https://github.com/elfmz/llvm-project",
27+
"type": "boolean"
28+
},
29+
"BreakConstructorInitializers": {
30+
"title": "Break constructor initializers.",
31+
"x-intellij-html-description": "Modified to match https://github.com/elfmz/llvm-project",
32+
"enum": [
33+
"AfterColonSeparated"
34+
],
35+
"type": "string"
36+
},
37+
"SpaceBeforeAssignmentOperators": {
38+
"title": "If `false`, spaces will be removed before assignment operators.",
39+
"x-intellij-html-description": "Modified to match https://github.com/elfmz/llvm-project",
40+
"enum": [
41+
"OnlyTrivial"
42+
],
43+
"type": "string"
44+
},
45+
"AlignConsecutiveMembersAssignments": {
46+
"title": "Align consecutive members assignments.",
47+
"x-intellij-html-description": "Added to match https://github.com/elfmz/llvm-project",
48+
"type": "boolean"
49+
},
50+
"AllowLongTrailingComments": {
51+
"title": "Allow long trailing comments.",
52+
"x-intellij-html-description": "Added to match https://github.com/elfmz/llvm-project",
53+
"type": "boolean"
54+
}
55+
}
56+
}

0 commit comments

Comments
 (0)