Update clang-format.

This commit is contained in:
Jean-Philip Desjardins 2023-08-18 10:33:11 -04:00
parent 907442608a
commit a73b97f0be
2 changed files with 26 additions and 4 deletions

View file

@ -1,7 +1,26 @@
# Settings tested with clang-format 16
AccessModifierOffset: -4 AccessModifierOffset: -4
AllowShortBlocksOnASingleLine: Always
AllowShortFunctionsOnASingleLine: None AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: true AllowShortIfStatementsOnASingleLine: true
BreakBeforeBraces: Allman BreakBeforeBraces: Custom
BraceWrapping:
AfterEnum: true
AfterClass: true
AfterCaseLabel: true
AfterStruct: true
AfterUnion: true
AfterExternBlock: true
AfterObjCDeclaration: true
AfterFunction: true
AfterNamespace: true
AfterControlStatement: Always
BeforeCatch: true
BeforeElse: true
BeforeWhile: false
SplitEmptyFunction: true
BeforeLambdaBody: false
BreakConstructorInitializers: BeforeComma BreakConstructorInitializers: BeforeComma
ColumnLimit: 0 ColumnLimit: 0
FixNamespaceComments: false FixNamespaceComments: false
@ -10,6 +29,9 @@ NamespaceIndentation: All
PointerBindsToType: true PointerBindsToType: true
SortIncludes: false SortIncludes: false
SpaceBeforeParens: Never SpaceBeforeParens: Never
Standard: Cpp11 Standard: c++17
SpacesInLineCommentPrefix:
Minimum: 0
Maximum: -1
TabWidth: 4 TabWidth: 4
UseTab: ForIndentation UseTab: ForIndentation

View file

@ -6,12 +6,12 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: DoozyX/clang-format-lint-action@v0.11 - uses: DoozyX/clang-format-lint-action@v0.16.2
with: with:
source: './Source ./tools' source: './Source ./tools'
exclude: './Source/ui_qt/win32/Resources ./Source/ui_libretro/ext' exclude: './Source/ui_qt/win32/Resources ./Source/ui_libretro/ext'
extensions: 'h,cpp,c,m,mm' extensions: 'h,cpp,c,m,mm'
clangFormatVersion: 6 clangFormatVersion: 16
inplace: True inplace: True
- name: Check for changes - name: Check for changes
run: | run: |