diff --git a/.clang-format b/.clang-format index d6b6f78..7de0803 100644 --- a/.clang-format +++ b/.clang-format @@ -1,15 +1,15 @@ --- -Language: Cpp +Language: Cpp # BasedOnStyle: LLVM AccessModifierOffset: -4 AlignAfterOpenBracket: Align AlignConsecutiveAssignments: true AlignConsecutiveDeclarations: true AlignEscapedNewlines: Left -AlignOperands: true +AlignOperands: true AlignTrailingComments: true AllowAllParametersOfDeclarationOnNextLine: false -AllowShortBlocksOnASingleLine: false +AllowShortBlocksOnASingleLine: Never AllowShortCaseLabelsOnASingleLine: false AllowShortFunctionsOnASingleLine: Inline AllowShortIfStatementsOnASingleLine: Never @@ -42,26 +42,26 @@ BreakBeforeTernaryOperators: true BreakConstructorInitializers: AfterColon # BreakInheritanceList: AfterColon BreakStringLiterals: true -ColumnLimit: 120 -CommentPragmas: '^ (coverity|pragma:)' +ColumnLimit: 120 +CommentPragmas: '^ (coverity|pragma:)' CompactNamespaces: false ConstructorInitializerAllOnOneLineOrOnePerLine: true ConstructorInitializerIndentWidth: 4 ContinuationIndentWidth: 4 Cpp11BracedListStyle: true DerivePointerAlignment: false -DisableFormat: false +DisableFormat: false ExperimentalAutoDetectBinPacking: false FixNamespaceComments: true -ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ] +ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ] IncludeBlocks: Preserve IndentCaseLabels: false IndentPPDirectives: AfterHash -IndentWidth: 4 +IndentWidth: 4 IndentWrappedFunctionNames: false KeepEmptyLinesAtTheStartOfBlocks: false MacroBlockBegin: '' -MacroBlockEnd: '' +MacroBlockEnd: '' MaxEmptyLinesToKeep: 1 NamespaceIndentation: None PenaltyBreakAssignment: 2 @@ -72,8 +72,8 @@ PenaltyBreakString: 1000 PenaltyExcessCharacter: 1000000 PenaltyReturnTypeOnItsOwnLine: 10000 # Raised intentionally because it hurts readability PointerAlignment: Left -ReflowComments: true -SortIncludes: false +ReflowComments: true +SortIncludes: Never SortUsingDeclarations: false SpaceAfterCStyleCast: true SpaceAfterTemplateKeyword: true @@ -85,12 +85,12 @@ SpaceBeforeCtorInitializerColon: true SpaceBeforeRangeBasedForLoopColon: true SpaceInEmptyParentheses: false SpacesBeforeTrailingComments: 2 -SpacesInAngles: false +SpacesInAngles: false SpacesInCStyleCastParentheses: false SpacesInContainerLiterals: false SpacesInParentheses: false SpacesInSquareBrackets: false -Standard: Cpp11 -TabWidth: 8 -UseTab: Never +Standard: c++14 +TabWidth: 8 +UseTab: Never ... diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 384a609..65ab3d5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -17,7 +17,7 @@ jobs: c-compiler: clang cxx-compiler: clang++ steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - run: | wget https://apt.llvm.org/llvm.sh chmod +x llvm.sh @@ -37,7 +37,7 @@ jobs: run: | make VERBOSE=1 make test - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: always() with: name: ${{github.job}} @@ -59,7 +59,7 @@ jobs: c-compiler: clang cxx-compiler: clang++ steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - run: | sudo apt update -y && sudo apt upgrade -y sudo apt install gcc-multilib g++-multilib @@ -75,7 +75,7 @@ jobs: run: | make VERBOSE=1 make test - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: always() with: name: ${{github.job}} @@ -89,7 +89,7 @@ jobs: mcu: at90can64 flags: -Wall -Wextra -Werror -pedantic -Wconversion -Wtype-limits steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - run: | sudo apt update -y && sudo apt upgrade -y sudo apt install gcc-avr avr-libc @@ -105,7 +105,7 @@ jobs: env: flags: -Wall -Wextra -Werror -pedantic -Wconversion -Wtype-limits -Wcast-align -Wfatal-errors steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - run: | sudo apt update -y && sudo apt upgrade -y sudo apt-get install -y gcc-arm-none-eabi @@ -116,8 +116,8 @@ jobs: if: github.event_name == 'push' runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: DoozyX/clang-format-lint-action@v0.15 + - uses: actions/checkout@v4 + - uses: DoozyX/clang-format-lint-action@v0.17 with: source: './libcanard ./tests' exclude: './tests/catch' @@ -138,7 +138,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 @@ -154,7 +154,7 @@ jobs: distribution: zulu - name: Cache SonarCloud packages - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.sonar/cache key: ${{ runner.os }}-sonar @@ -198,7 +198,7 @@ jobs: --define sonar.cfamily.build-wrapper-output="${{ env.BUILD_WRAPPER_OUT_DIR }}" --define sonar.host.url="${{ env.SONAR_SERVER_URL }}" - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: always() with: name: ${{github.job}}