Skip to content

Commit

Permalink
review: Use official qodana github action (#4843)
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinWitt authored Nov 21, 2022
1 parent 2fdbb82 commit d753cba
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 28 deletions.
35 changes: 8 additions & 27 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,39 +142,20 @@ jobs:
- name: Run Javadoc quality check
run: ./chore/check-javadoc-regressions.py COMPARE_WITH_MASTER

code-quality: # we create a new step here because qodana analyzer takes around 10min
code-quality:
runs-on: ubuntu-latest
env:
MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false
QODANA_LINTER: jetbrains/qodana-jvm-community@sha256:c388ddd7b852296f71b1a786d3b30f458a993eb252d5cd4963422007e5b824db
name: code-quality qodana
steps:
- name: Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3.1.0
with:
path: pull_request
- uses: actions/setup-java@de1bb2b0c5634f0fc4438d7aa9944e68f9bf86cc # tag=v3.6.0
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3.0.2
with:
java-version: 17
distribution: ${{ env.JAVA_DISTRIBUTION }}
- name: git reset
run: cd pull_request && git fetch && git reset --soft origin/master
- name: Qodana - Code Inspection
uses: JetBrains/qodana-action@f8a64bc18ee8f15e4a7c6e092270c470da7ad091 # tag=v2022.2.2
fetch-depth: 0
- name: 'Qodana Scan'
uses: JetBrains/[email protected]
with:
linter: ${{ env.QODANA_LINTER }}
project-dir: "${{ github.workspace }}/pull_request"
inspected-dir: ./src/main/java # only main spoon project at first
results-dir: "${{ github.workspace }}/result"
changes: true
fail-threshold: 0
use-annotations: false
use-caches: false # we disable cache for consistent results
- uses: github/codeql-action/upload-sarif@678fc3afe258fb2e0cdc165ccf77b85719de7b3c # v2
if: always()
args: --source-directory,./src/main/java , --fail-threshold, 0
- uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: "${{ github.workspace }}/result/qodana.sarif.json"

sarif_file: ${{ runner.temp }}/qodana/results/qodana.sarif.json
reproducible-builds:
runs-on: ubuntu-latest
env:
Expand Down
3 changes: 2 additions & 1 deletion qodana.yml → qodana.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
version: 1.0
profile:
name: qodana.recommended
version: "1.0"
linter: jetbrains/qodana-jvm-community:2022.3-eap
include:
- name: Anonymous2MethodRef
- name: AssignmentToCatchBlockParameter
Expand Down

0 comments on commit d753cba

Please sign in to comment.