Skip to content

Commit cabe3b8

Browse files
author
Jegors Cemisovs
committed
Integrate Qodana configuration and GitHub Actions workflow for code quality analysis
1 parent 6d2c649 commit cabe3b8

File tree

2 files changed

+89
-0
lines changed

2 files changed

+89
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
#-------------------------------------------------------------------------------#
2+
# Discover all capabilities of Qodana in our documentation #
3+
# https://www.jetbrains.com/help/qodana/about-qodana.html #
4+
#-------------------------------------------------------------------------------#
5+
6+
name: Qodana
7+
on:
8+
workflow_dispatch:
9+
pull_request:
10+
push:
11+
branches:
12+
- master
13+
- chore/versoins-bump
14+
15+
jobs:
16+
qodana:
17+
runs-on: ubuntu-latest
18+
permissions:
19+
contents: write
20+
pull-requests: write
21+
checks: write
22+
steps:
23+
- uses: actions/checkout@v4
24+
with:
25+
ref: ${{ github.event.pull_request.head.sha }}
26+
fetch-depth: 0
27+
- name: 'Qodana Scan'
28+
uses: JetBrains/qodana-action@v2026.1
29+
env:
30+
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
31+
with:
32+
# When pr-mode is set to true, Qodana analyzes only the files that have been changed
33+
pr-mode: false
34+
use-caches: true
35+
post-pr-comment: true
36+
use-annotations: true
37+
# Upload Qodana results (SARIF, other artifacts, logs) as an artifact to the job
38+
upload-result: false
39+
# quick-fixes available in Ultimate and Ultimate Plus plans
40+
push-fixes: 'none'

qodana.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
#-------------------------------------------------------------------------------#
2+
# Qodana analysis is configured by qodana.yaml file #
3+
# https://www.jetbrains.com/help/qodana/qodana-yaml.html #
4+
#-------------------------------------------------------------------------------#
5+
6+
#################################################################################
7+
# WARNING: Do not store sensitive information in this file, #
8+
# as its contents will be included in the Qodana report. #
9+
#################################################################################
10+
version: "1.0"
11+
12+
#Specify inspection profile for code analysis
13+
profile:
14+
name: qodana.starter
15+
16+
#Enable inspections
17+
#include:
18+
# - name: <SomeEnabledInspectionId>
19+
20+
#Disable inspections
21+
#exclude:
22+
# - name: <SomeDisabledInspectionId>
23+
# paths:
24+
# - <path/where/not/run/inspection>
25+
26+
projectJDK: "17" #(Applied in CI/CD pipeline)
27+
28+
#Execute shell command before Qodana execution (Applied in CI/CD pipeline)
29+
#bootstrap: sh ./prepare-qodana.sh
30+
31+
#Install IDE plugins before Qodana execution (Applied in CI/CD pipeline)
32+
#plugins:
33+
# - id: <plugin.id> #(plugin id can be found at https://plugins.jetbrains.com)
34+
35+
# Quality gate. Will fail the CI/CD pipeline if any condition is not met
36+
# severityThresholds - configures maximum thresholds for different problem severities
37+
# testCoverageThresholds - configures minimum code coverage on a whole project and newly added code
38+
# Code Coverage is available in Ultimate and Ultimate Plus plans
39+
#failureConditions:
40+
# severityThresholds:
41+
# any: 15
42+
# critical: 5
43+
# testCoverageThresholds:
44+
# fresh: 70
45+
# total: 50
46+
47+
#Qodana supports other languages, for example, Python, JavaScript, TypeScript, Go, C#, PHP
48+
#For all supported languages see https://www.jetbrains.com/help/qodana/linters.html
49+
linter: jetbrains/qodana-jvm-community:2026.1

0 commit comments

Comments
 (0)