From a55ff88e08da0f554527d3b612bae9c3ce1b1297 Mon Sep 17 00:00:00 2001 From: Gustavo Henrique Santos Souza de Miranda Date: Sat, 29 Nov 2025 04:23:48 -0300 Subject: [PATCH] Refine Qodana config: simplify bootstrap logic and improve POSIX compatibility --- qodana.yaml | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/qodana.yaml b/qodana.yaml index de49ec5..bf7d7eb 100644 --- a/qodana.yaml +++ b/qodana.yaml @@ -8,19 +8,13 @@ linter: qodana-jvm profile: name: qodana.recommended bootstrap: | - # Generate sources (including protobuf) so Qodana resolves imports correctly - # Prefer Maven Wrapper if present; fall back to system mvn (POSIX sh compatible) - # Ensure mvnw is executable if present - if [ -f ./mvnw ]; then chmod +x ./mvnw || true; fi - if [ -x ./mvnw ]; then - ./mvnw -B -q -DskipTests -DskipITs=true generate-sources || true - elif [ -f ./mvnw ]; then - sh ./mvnw -B -q -DskipTests -DskipITs=true generate-sources || true - elif command -v mvn >/dev/null 2>&1; then - mvn -B -q -DskipTests -DskipITs=true generate-sources || true - else - echo "[Qodana bootstrap] Maven not available; skipping source generation" - fi + # Generate sources (including protobuf) so Qodana resolves imports correctly. + # Use a POSIX-safe, fi-less chain to avoid /bin/sh parsing issues in CI. + chmod +x ./mvnw 2>/dev/null || true + ./mvnw -B -q -DskipTests -DskipITs=true generate-sources 2>/dev/null || \ + sh ./mvnw -B -q -DskipTests -DskipITs=true generate-sources 2>/dev/null || \ + mvn -B -q -DskipTests -DskipITs=true generate-sources 2>/dev/null || \ + echo "[Qodana bootstrap] Maven not available; skipping source generation" include: - name: CheckDependencyLicenses exclude: