Skip to content

Adopt Qodana Community Edition for Multi-Language Code Quality Checks #70

@miroslavpojer

Description

@miroslavpojer

Adopt Qodana Community Edition for Multi-Language Code Quality Checks

Update:

  • compare Qodana with concurrent solutions

Issue description is universal - will be used for more repos.

Goal

Integrate JetBrains Qodana (Community Edition) into CI/CD to establish code quality gates across all primary languages used in this repository:

  • Terraform → covered by tflint (already in place)
  • Python → analyzed by qodana-python
  • Scala (JVM) → analyzed by qodana-jvm-community + org.intellij.scala plugin
  • JavaScript/TypeScript → analyzed by qodana-js

The purpose is to block new issues in PRs while progressively reducing the existing backlog.


Implementation Steps

1. Qodana configuration

  • Create qodana.yaml in the root with basic excludes and plugin config for Scala.
  • Define excludes for generated/build folders, dependencies, and legacy paths.

2. Initial baselines

  • Run local scans and create baselines:
    qodana scan --linter jetbrains/qodana-jvm-community --baseline qodana-baselines/jvm.sarif.json --save-report
    qodana scan --linter jetbrains/qodana-python --baseline qodana-baselines/python.sarif.json --save-report
    qodana scan --linter jetbrains/qodana-js --project-dir web --baseline qodana-baselines/js.sarif.json --save-report
  • Commit qodana.yaml and all .sarif.json baseline files.

3. GitHub Actions workflow

  • Add new job in .github/workflows/test.yml.
  • Set --fail-threshold 0 to fail only when new issues are introduced.

4. Branch protection rules

  • Require successful completion of all Qodana jobs for PR merge.

📊 Expected Benefits

Area Impact
PR Quality Gate No new technical debt (new issues fail CI)
Multi-language Coverage Consistent inspection across Python, Scala, and JS
Developer Experience Inline annotations in PRs via SARIF integration

🔧 References

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions