Skip to content

Commit 5f07222

Browse files
ci(Qodana): add qodana.yaml & GitHub workflow
1 parent e0a28dd commit 5f07222

File tree

2 files changed

+74
-0
lines changed

2 files changed

+74
-0
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Qodana
2+
on:
3+
workflow_dispatch:
4+
pull_request:
5+
push:
6+
branches: # Specify your branches here
7+
- main # The 'main' branch
8+
- 'releases/*' # The release branches
9+
10+
jobs:
11+
qodana:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: write
15+
pull-requests: write
16+
checks: write
17+
steps:
18+
- uses: actions/checkout@v3
19+
with:
20+
ref: ${{ github.event.pull_request.head.sha }} # to check out the actual pull request commit, not the merge commit
21+
fetch-depth: 0 # a full history is required for pull request analysis
22+
- name: 'Qodana Scan'
23+
uses: JetBrains/qodana-action@v2025.2
24+
with:
25+
pr-mode: false
26+
env:
27+
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN_1941125997 }}
28+
QODANA_ENDPOINT: 'https://qodana.cloud'

qodana.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
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.recommended
15+
16+
#Enable inspections
17+
include:
18+
- name: CheckDependencyLicenses
19+
20+
#Disable inspections
21+
#exclude:
22+
# - name: <SomeDisabledInspectionId>
23+
# paths:
24+
# - <path/where/not/run/inspection>
25+
26+
#Execute shell command before Qodana execution (Applied in CI/CD pipeline)
27+
#bootstrap: sh ./prepare-qodana.sh
28+
29+
#Install IDE plugins before Qodana execution (Applied in CI/CD pipeline)
30+
#plugins:
31+
# - id: <plugin.id> #(plugin id can be found at https://plugins.jetbrains.com)
32+
33+
# Quality gate. Will fail the CI/CD pipeline if any condition is not met
34+
# severityThresholds - configures maximum thresholds for different problem severities
35+
# testCoverageThresholds - configures minimum code coverage on a whole project and newly added code
36+
# Code Coverage is available in Ultimate and Ultimate Plus plans
37+
#failureConditions:
38+
# severityThresholds:
39+
# any: 15
40+
# critical: 5
41+
# testCoverageThresholds:
42+
# fresh: 70
43+
# total: 50
44+
45+
#Specify Qodana linter for analysis (Applied in CI/CD pipeline)
46+
linter: jetbrains/qodana-go:2025.2

0 commit comments

Comments
 (0)