From 3868bc0210f6cec027d8e96c924f851165eecd99 Mon Sep 17 00:00:00 2001 From: Dima Golovinov Date: Wed, 18 Sep 2024 14:53:23 +0200 Subject: [PATCH 1/3] Provide proper checkout configuration for Qodana needs --- .github/workflows/build.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 030c804..802d9f4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -39,6 +39,9 @@ jobs: # Check out the current repository - name: Fetch Sources uses: actions/checkout@v4 + 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 # Validate wrapper - name: Gradle Wrapper Validation From 93c0a0b2f3ddf184e2bf7d5079de22b83c49dda3 Mon Sep 17 00:00:00 2001 From: Dima Golovinov Date: Wed, 18 Sep 2024 14:55:44 +0200 Subject: [PATCH 2/3] Update Qodana version to latest stable --- .github/workflows/build.yml | 2 +- qodana.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 802d9f4..9b1d89b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -171,7 +171,7 @@ jobs: # Run Qodana inspections - name: Qodana - Code Inspection - uses: JetBrains/qodana-action@v2024.1.5 + uses: JetBrains/qodana-action@v2024.2 with: cache-default-branch-only: true diff --git a/qodana.yml b/qodana.yml index cbf640f..a502427 100644 --- a/qodana.yml +++ b/qodana.yml @@ -2,7 +2,7 @@ # https://www.jetbrains.com/help/qodana/qodana-yaml.html version: 1.0 -linter: jetbrains/qodana-jvm-community:latest +linter: jetbrains/qodana-jvm-community:2024.2 projectJDK: "17" profile: name: qodana.recommended From b3221416a9b84844a81c354d8762d5d94895f001 Mon Sep 17 00:00:00 2001 From: hybloid <48032702+hybloid@users.noreply.github.com> Date: Wed, 18 Sep 2024 17:32:38 +0200 Subject: [PATCH 3/3] Sources should be fetched with full history before running Qodana --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9b1d89b..a7c3d32 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -39,9 +39,6 @@ jobs: # Check out the current repository - name: Fetch Sources uses: actions/checkout@v4 - 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 # Validate wrapper - name: Gradle Wrapper Validation @@ -161,6 +158,9 @@ jobs: # Check out the current repository - name: Fetch Sources uses: actions/checkout@v4 + 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 # Set up Java environment for the next steps - name: Setup Java