diff --git a/.clang-format b/.clang-format new file mode 100644 index 00000000..bb47648f --- /dev/null +++ b/.clang-format @@ -0,0 +1,30 @@ +Language: Cpp +BasedOnStyle: Microsoft +Standard: c++20 +AccessModifierOffset: -4 +AlignAfterOpenBracket: DontAlign +AlignConsecutiveAssignments: false +AlignConsecutiveDeclarations: false +AlignOperands: AlignAfterOperator +AlignTrailingComments: true +AllowAllConstructorInitializersOnNextLine: false +AllowAllParametersOfDeclarationOnNextLine: false +AllowShortFunctionsOnASingleLine: InlineOnly +AllowShortIfStatementsOnASingleLine: true +AlwaysBreakTemplateDeclarations: Yes +BraceWrapping: + AfterUnion: true +BreakBeforeBinaryOperators: All +BreakBeforeTernaryOperators: false +BreakConstructorInitializers: BeforeComma +ColumnLimit: 0 +ConstructorInitializerAllOnOneLineOrOnePerLine: true +Cpp11BracedListStyle: false +IndentCaseBlocks: true +IndentPPDirectives: BeforeHash +KeepEmptyLinesAtTheStartOfBlocks: false +MaxEmptyLinesToKeep: 1 +NamespaceIndentation: All +PointerAlignment: Left +SortIncludes: true +SpaceAfterTemplateKeyword: false \ No newline at end of file diff --git a/.github/workflows/clang-format-check.yml b/.github/workflows/clang-format-check.yml new file mode 100644 index 00000000..60f10a42 --- /dev/null +++ b/.github/workflows/clang-format-check.yml @@ -0,0 +1,13 @@ +name: clang-format Check +on: [push, pull_request] +jobs: + formatting-check: + name: Formatting Check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Run clang-format style check + uses: jidicula/clang-format-action@v4.13.0 + with: + clang-format-version: '13' + check-path: 'src' \ No newline at end of file diff --git a/approot/admin-scansettings.xml b/approot/admin-scansettings.xml index 0e760a7a..17c244af 100644 --- a/approot/admin-scansettings.xml +++ b/approot/admin-scansettings.xml @@ -36,35 +36,39 @@