From b7ea0695eb33cf630381fff7b81ae7d8bf28740e Mon Sep 17 00:00:00 2001 From: Franziska Wegner <57569315+franziska-wegner@users.noreply.github.com> Date: Fri, 29 Dec 2023 01:48:43 -0800 Subject: [PATCH] Update C/C++ Linter Workflow (#59) This commit updates the C/C++ Linter workflow at `.github/workflows/cpp-linter.yml`. The style is changed from `llvm` to `file` and the action ignores now also `Qt/Qt` and `build/CMakeFiles` folder that are out of the repositories changing reach. As a future restriction, this workflow is only allowed to write status and the remaining is changed to read only. * Change style to file * Add Qt to the ignored directories * Add permissions accordingly for the workflow * Add `build/CMakeFiles` to the ignore paths --- .github/workflows/cpp-linter.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cpp-linter.yml b/.github/workflows/cpp-linter.yml index ebe92cc1..6f7fc6ba 100644 --- a/.github/workflows/cpp-linter.yml +++ b/.github/workflows/cpp-linter.yml @@ -20,6 +20,12 @@ concurrency: env: QT_VERSION: "6.2.0" +permissions: + contents: read + packages: read + # To report GitHub Actions status checks + statuses: write + jobs: cpp-linter: @@ -111,8 +117,8 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - style: llvm #file - tidy-checks: boost-*,bugprone-*,performance-*,readability-*,portability-*,modernize-*,clang-analyzer-*,cppcoreguidelines-* + style: "file" #llvm + tidy-checks: "boost-*,bugprone-*,performance-*,readability-*,portability-*,modernize-*,clang-analyzer-*,cppcoreguidelines-*" files-changed-only: false lines-changed-only: false no-lgtm: false @@ -120,7 +126,7 @@ jobs: # in a pull request's thread. Set it to false to disable the comment. # Set it to true to post a new comment (and delete the old comment). thread-comments: ${{ github.event_name == 'pull_request' && 'update' }} - ignore: external + ignore: "external|Qt|build/CMakeFiles" - name: Fail fast?! if: steps.linter.outputs.checks-failed > 0