Skip to content

Commit dba8d3a

Browse files
chore: enforce consistent code formatting with clang-format
1 parent e94e818 commit dba8d3a

21 files changed

Lines changed: 768 additions & 725 deletions

.clang-format

Lines changed: 30 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,25 @@
11
AccessModifierOffset: -4
2-
AlignAfterOpenBracket: DontAlign
3-
AllowShortFunctionsOnASingleLine: All
2+
AlignAfterOpenBracket: AlwaysBreak
3+
AllowShortFunctionsOnASingleLine: false
44
BasedOnStyle: Microsoft
5+
BinPackArguments: false
6+
BinPackParameters: false
57
BraceWrapping:
6-
AfterClass: true
7-
AfterControlStatement: true
8-
AfterEnum: true
9-
AfterNamespace: true
10-
AfterStruct: true
11-
AfterUnion: true
12-
AfterCaseLabel : true
13-
BeforeCatch: true
14-
BeforeElse: true
15-
IndentBraces: false
16-
SplitEmptyFunction: true
17-
SplitEmptyRecord: true
8+
AfterClass: true
9+
AfterControlStatement: true
10+
AfterEnum: true
11+
AfterNamespace: true
12+
AfterStruct: true
13+
AfterUnion: true
14+
AfterCaseLabel: true
15+
BeforeCatch: true
16+
BeforeElse: true
17+
IndentBraces: false
18+
SplitEmptyFunction: true
19+
SplitEmptyRecord: true
1820
BreakBeforeBraces: Custom
19-
ColumnLimit: 0
20-
Cpp11BracedListStyle: true
21+
ColumnLimit: 120
22+
Cpp11BracedListStyle: false
2123
FixNamespaceComments: true
2224
IndentCaseLabels: true
2325
IndentPPDirectives: AfterHash
@@ -29,17 +31,24 @@ SortIncludes: false
2931
SortUsingDeclarations: false
3032
SpaceAfterCStyleCast: false
3133
SpaceBeforeAssignmentOperators: true
32-
SpaceBeforeParens: ControlStatements
34+
SpaceBeforeParens: Never
3335
SpaceInEmptyParentheses: false
3436
SpacesInCStyleCastParentheses: false
3537
SpacesInParentheses: true
3638
SpacesInSquareBrackets: false
3739
TabWidth: 4
3840
UseTab: false
3941
KeepEmptyLines:
40-
AtStartOfBlock: false
41-
AtStartOfFile: false
42-
AtEndOfFile: false
42+
AtStartOfBlock: false
43+
AtStartOfFile: false
44+
AtEndOfFile: false
45+
CompactNamespaces: false
46+
ShortNamespaceLines: 0
4347
SpaceBeforeRangeBasedForLoopColon: true
4448
SpacesInContainerLiterals: false
45-
SeparateDefinitionBlocks: Always
49+
BreakConstructorInitializers: BeforeColon
50+
AlwaysBreakBeforeMultilineStrings: true
51+
AlwaysBreakTemplateDeclarations: Yes
52+
ConstructorInitializerAllOnOneLineOrOnePerLine: false
53+
AllowAllConstructorInitializersOnNextLine: false
54+
PackConstructorInitializers: Never

.editorconfig

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,30 @@
11
# EditorConfig is awesome: https://EditorConfig.org
22

3-
# C++ specific settings
3+
root = true
4+
5+
[*]
6+
charset = utf-8
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
411
[*.{cpp,hpp,h,cc,cxx,inl}]
512
indent_style = space
613
indent_size = 4
7-
end_of_line = lf
814

9-
# CMake files
1015
[{CMakeLists.txt,*.cmake}]
1116
indent_style = space
1217
indent_size = 4
13-
end_of_line = lf
18+
19+
[*.md]
20+
indent_style = space
21+
indent_size = 4
22+
trim_trailing_whitespace = false
23+
24+
[*.{yml,yaml}]
25+
indent_style = space
26+
indent_size = 2
27+
28+
[*.json]
29+
indent_style = space
30+
indent_size = 4

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ ZERO_CHECK.vcxproj*
1919
RUN_TESTS.vcxproj*
2020
TESTS_*.vcxproj*
2121
.qtcreator
22+
CMakeLists.txt.user
2223

2324
# cpp build directory
2425
build/
@@ -88,4 +89,4 @@ coverage/
8889
# Project-specific build artifacts
8990
nfx-datatypes*/
9091
lib/
91-
tests/TESTS_*[1]_*
92+
TMP/

CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
6565
#----------------------------------------------
6666

6767
include(nfxDataTypesBuildConfig)
68-
include(nfxDataTypesDependencies)
6968
include(nfxDataTypesSources)
7069
include(nfxDataTypesTargets)
7170

0 commit comments

Comments
 (0)