Compare commits

..

6 Commits

Author SHA1 Message Date
Gustavo Henrique Santos Souza de Miranda 48943160f1 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.
2025-11-29 04:46:17 -03:00
Gustavo Henrique Santos Souza de Miranda 4d6e1cbb3a Disable Qodana bootstrap script to avoid shell parsing issues in CI 2025-11-29 04:36:33 -03:00
Gustavo Henrique Santos Souza de Miranda 652567aa8b Disable Qodana bootstrap script to avoid shell parsing issues in CI 2025-11-29 04:29:26 -03:00
Gustavo Henrique Santos Souza de Miranda f0b786d740 Refine Qodana bootstrap: simplify POSIX-safe chain and suppress command output 2025-11-29 04:26:10 -03:00
Gustavo Henrique Santos Souza de Miranda a55ff88e08 Refine Qodana config: simplify bootstrap logic and improve POSIX compatibility 2025-11-29 04:23:48 -03:00
Gustavo Henrique Santos Souza de Miranda f39c19fb5c Update Qodana config and workflow: simplify linter configuration
- Removed `args` step from workflow; linter is now fully defined in `qodana.yaml` as `qodana-jvm`.
- Switched to canonical linter name in `qodana.yaml` to avoid image warnings and CLI issues.
2025-11-29 04:19:48 -03:00
2 changed files with 52 additions and 18 deletions

View File

@ -45,13 +45,56 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
# Set up JDK for potential code generation (e.g., protobuf) prior to Qodana analysis
- name: Set up Java 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
cache: 'maven'
# Generate sources so that Qodana resolves imports from generated code
- name: Generate sources (protobuf)
shell: bash
run: |
if [ -f ./mvnw ]; then chmod +x ./mvnw || true; fi
if [ -x ./mvnw ]; then
./mvnw -B -DskipTests -DskipITs=true generate-sources || true
elif command -v mvn >/dev/null 2>&1; then
mvn -B -DskipTests -DskipITs=true generate-sources || true
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:
# Enable PR-specific reporting only for pull_request events
pr-mode: ${{ github.event_name == 'pull_request' }}
# Pass the linter image via args (the action does not support an `image` input)
args: --image jetbrains/qodana-jvm:2025.2
# No extra args needed; linter is defined in qodana.yaml (qodana-jvm)
env:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN_268690425 }}
QODANA_ENDPOINT: 'https://qodana.cloud'

View File

@ -3,28 +3,19 @@
####################################################################################################################
version: "1.0"
linter: jetbrains/qodana-jvm:2025.2
# Use canonical linter name to avoid image warnings and CLI flag issues
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
# Disabled bootstrap to avoid shell parsing issues in CI. If you need code generation,
# we can re-enable a robust script later. For now, do nothing and let Qodana run.
:
include:
- name: CheckDependencyLicenses
exclude:
# Exclude generated sources from inspections to reduce noise
- name: All
paths:
- target/generated-sources/**
- target/protoc-dependencies/**
- target/protoc-dependencies/**
# Keep generated sources included for indexing/resolution; excluding them can cause unresolved imports