Skip to content

Commit 83e4cfb

Browse files
authored
Enable use of clang-format (#673)
1 parent e31f076 commit 83e4cfb

97 files changed

Lines changed: 12089 additions & 12528 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.clang-format-ignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*/DDS.h

‎.github/linters/.clang-format‎

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
Language: Cpp
2+
BasedOnStyle: LLVM
3+
AccessModifierOffset: -4
4+
AlignAfterOpenBracket: false
5+
AlignConsecutiveAssignments:
6+
Enabled: true
7+
AcrossEmptyLines: false
8+
AcrossComments: false
9+
AlignConsecutiveDeclarations:
10+
Enabled: true
11+
AcrossEmptyLines: false
12+
AcrossComments: false
13+
AlignEscapedNewlines: Left
14+
AlignOperands: true
15+
AlignConsecutiveShortCaseStatements:
16+
Enabled: true
17+
AcrossEmptyLines: true
18+
AcrossComments: true
19+
AlignCaseColons: false
20+
AlignTrailingComments:
21+
Kind: Always
22+
OverEmptyLines: 2
23+
AllowAllArgumentsOnNextLine: false
24+
AllowAllParametersOfDeclarationOnNextLine: false
25+
AllowShortBlocksOnASingleLine: Empty
26+
AllowShortCaseLabelsOnASingleLine: true
27+
AllowShortFunctionsOnASingleLine: Inline
28+
AllowShortIfStatementsOnASingleLine: Never
29+
AllowShortLambdasOnASingleLine: Empty
30+
AllowShortLoopsOnASingleLine: false
31+
AlwaysBreakAfterReturnType: None
32+
AlwaysBreakBeforeMultilineStrings: true
33+
BinPackArguments: false
34+
BinPackParameters: false
35+
BreakBeforeBraces: Custom
36+
BraceWrapping:
37+
AfterClass: true
38+
AfterControlStatement: true
39+
AfterEnum: true
40+
AfterFunction: true
41+
AfterNamespace: true
42+
AfterStruct: true
43+
AfterUnion: true
44+
BeforeCatch: true
45+
BeforeElse: true
46+
BeforeLambdaBody: true
47+
SplitEmptyFunction: false
48+
SplitEmptyRecord: false
49+
#requires clang-format 22
50+
#BreakAfterOpenBracketFunction: true
51+
#BreakBeforeCloseBracketFunction: true
52+
BreakBeforeBinaryOperators: All
53+
BreakBeforeTernaryOperators: false
54+
BreakConstructorInitializers: BeforeColon
55+
BreakInheritanceList: BeforeColon
56+
BreakTemplateDeclarations: Yes
57+
ColumnLimit: 140
58+
ConstructorInitializerAllOnOneLineOrOnePerLine: true
59+
Cpp11BracedListStyle: false
60+
FixNamespaceComments: true
61+
IndentCaseLabels: false
62+
IndentExternBlock: Indent
63+
IndentPPDirectives: None
64+
IndentWidth: 4
65+
InsertNewlineAtEOF: true
66+
LineEnding: CRLF
67+
NamespaceIndentation: All
68+
PackConstructorInitializers: Never
69+
PointerAlignment: Left
70+
ReflowComments: true
71+
SortIncludes: false
72+
SpaceAfterCStyleCast: false
73+
#requires clang format 21
74+
#SpaceAfterOperatorKeyword: true
75+
SpaceAfterTemplateKeyword: false
76+
SpaceBeforeAssignmentOperators: true
77+
SpaceBeforeCaseColon: false
78+
SpaceBeforeCtorInitializerColon: true
79+
SpaceBeforeParens: ControlStatements
80+
SpaceInEmptyParentheses: false
81+
SpacesInAngles: false
82+
SpacesInCStyleCastParentheses: false
83+
SpacesInContainerLiterals: false
84+
SpacesInParentheses: false
85+
Standard: c++17
86+
TabWidth: 4
87+
UseTab: Never

‎.github/linters/.editorconfig-checker.json‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,8 @@
44
".git",
55
"LICENSE",
66
"Tests"
7-
]
7+
],
8+
"Disable": {
9+
"IndentSize": true
10+
}
811
}

‎.github/workflows/lint.yml‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,19 @@ jobs:
2626

2727
steps:
2828
- name: Checkout repository
29-
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
29+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
3030
with:
3131
fetch-depth: 0
3232

3333
- name: Lint Code Base
34-
uses: super-linter/super-linter@4ce20838b8ab83717e78138c5b3a1407148e0918 # v8.7.0
34+
uses: super-linter/super-linter@4ce20838b8ab83717e78138c5b3a1407148e0918 # v8.7.0
3535
env:
3636
DEFAULT_BRANCH: origin/main
3737
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3838
IGNORE_GITIGNORED_FILES: true
3939
VALIDATE_ALL_CODEBASE: true
4040
VALIDATE_CHECKOV: true
41+
VALIDATE_CLANG_FORMAT: true
4142
VALIDATE_EDITORCONFIG: true
4243
VALIDATE_CSHARP: true
4344
VALIDATE_GITHUB_ACTIONS: true

‎.github/workflows/mingw.yml‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ jobs:
4949
runs-on: ${{ matrix.os }}
5050

5151
steps:
52-
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
52+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
5353

5454
- name: Clone test repository
55-
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
55+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
5656
with:
5757
repository: walbourn/directxtktest
5858
path: Tests
@@ -102,6 +102,7 @@ jobs:
102102
-DBUILD_SHARED_LIBS=${{ matrix.shared }} -DBUILD_GAMEINPUT=${{ matrix.gameinput }}
103103
-DCMAKE_TOOLCHAIN_FILE="${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake" -DVCPKG_MANIFEST_DIR="${{ github.workspace }}/build"
104104
-DVCPKG_TARGET_TRIPLET="${env:VCPKG_DEFAULT_TRIPLET}"
105+
-DBUILD_BINPLACE=OFF
105106
106107
- name: 'Build'
107108
working-directory: ${{ github.workspace }}

0 commit comments

Comments
 (0)