From 3814730725326395b07a704a90802f3b0049544f Mon Sep 17 00:00:00 2001 From: Christian Helle Date: Sun, 29 Oct 2023 13:20:59 +0100 Subject: [PATCH 1/2] Add Qodana GitHub Actions workflow Added a new file `qodana.yml` to the `.github/workflows` directory that contains a new GitHub Actions workflow for Qodana. This was done to automate code quality checks and apply fixes for every push event to the main branch as well as on pull requests. The Qodana scan runs on Ubuntu latest and enables auto-fixing of detected issues. --- .github/workflows/qodana.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/qodana.yml diff --git a/.github/workflows/qodana.yml b/.github/workflows/qodana.yml new file mode 100644 index 0000000..39dba38 --- /dev/null +++ b/.github/workflows/qodana.yml @@ -0,0 +1,30 @@ +name: Qodana +on: + workflow_dispatch: + pull_request: + push: + branches: + - main + +jobs: + qodana: + runs-on: ubuntu-latest + permissions: + contents: write + pull-requests: write + checks: write + steps: + - uses: actions/checkout@v3 + with: + ref: ${{ github.event.pull_request.head.sha }} # to check out the actual pull request commit, not the merge commit + fetch-depth: 0 # a full history is required for pull request analysis + - name: 'Qodana Scan' + uses: JetBrains/qodana-action@v2023.2 + continue-on-error: true + with: + args: --apply-fixes + push-fixes: pull-request + pr-mode: false + env: + QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file From a1a970149f17118b9067484b3c3b36ebe62b350b Mon Sep 17 00:00:00 2001 From: Christian Helle Date: Sun, 29 Oct 2023 15:11:50 +0100 Subject: [PATCH 2/2] Add qodana config file --- qodana.yml | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 qodana.yml diff --git a/qodana.yml b/qodana.yml new file mode 100644 index 0000000..6c68f02 --- /dev/null +++ b/qodana.yml @@ -0,0 +1,2 @@ +version: "1.0" +fixesStrategy: apply