From 48943160f112c6db4f69c0a6d75b415b5f10bff0 Mon Sep 17 00:00:00 2001 From: Gustavo Henrique Santos Souza de Miranda Date: Sat, 29 Nov 2025 04:46:17 -0300 Subject: [PATCH] Update Qodana workflow: add compile step and include generated sources for resolution - Introduced a compile step (skipping tests) to prepare classes for import resolution. - Adjusted `qodana.yaml` to include generated sources instead of excluding them, preventing unresolved imports. --- .github/workflows/qodana_code_quality.yml | 23 +++++++++++++++++++++++ qodana.yaml | 4 ++-- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/.github/workflows/qodana_code_quality.yml b/.github/workflows/qodana_code_quality.yml index 6050e76..f41d564 100644 --- a/.github/workflows/qodana_code_quality.yml +++ b/.github/workflows/qodana_code_quality.yml @@ -66,6 +66,29 @@ jobs: else echo "[Qodana prep] Maven not available; skipping generate-sources" fi + + # Optionally compile (skip tests) to ensure classes are available for resolution + - name: Compile (skip tests) + shell: bash + run: | + if [ -x ./mvnw ]; then + ./mvnw -B -DskipTests -DskipITs=true compile || true + elif command -v mvn >/dev/null 2>&1; then + mvn -B -DskipTests -DskipITs=true compile || true + else + echo "[Qodana prep] Maven not available; skipping compile" + fi + + # Helpful debug: list generated sources if present + - name: Show generated sources + shell: bash + run: | + echo "=== target/generated-sources (tree) ===" || true + if [ -d target/generated-sources ]; then + find target/generated-sources -maxdepth 3 -type d -print || true + else + echo "(none)" || true + fi - name: 'Qodana Scan' uses: JetBrains/qodana-action@v2025.2 with: diff --git a/qodana.yaml b/qodana.yaml index c67302b..0dca656 100644 --- a/qodana.yaml +++ b/qodana.yaml @@ -17,5 +17,5 @@ exclude: # Exclude generated sources from inspections to reduce noise - name: All paths: - - target/generated-sources/** - - target/protoc-dependencies/** \ No newline at end of file + - target/protoc-dependencies/** + # Keep generated sources included for indexing/resolution; excluding them can cause unresolved imports \ No newline at end of file