Compare commits

..

No commits in common. "48943160f112c6db4f69c0a6d75b415b5f10bff0" and "e729ffcd4169d9605dda8d163b8e9ac03f1db24f" have entirely different histories.

2 changed files with 18 additions and 52 deletions

View File

@ -45,56 +45,13 @@ 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' }}
# No extra args needed; linter is defined in qodana.yaml (qodana-jvm)
# Pass the linter image via args (the action does not support an `image` input)
args: --image jetbrains/qodana-jvm:2025.2
env:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN_268690425 }}
QODANA_ENDPOINT: 'https://qodana.cloud'

View File

@ -3,19 +3,28 @@
####################################################################################################################
version: "1.0"
# Use canonical linter name to avoid image warnings and CLI flag issues
linter: qodana-jvm
linter: jetbrains/qodana-jvm:2025.2
profile:
name: qodana.recommended
bootstrap: |
# 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.
:
# 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
include:
- name: CheckDependencyLicenses
exclude:
# Exclude generated sources from inspections to reduce noise
- name: All
paths:
- target/generated-sources/**
- target/protoc-dependencies/**
# Keep generated sources included for indexing/resolution; excluding them can cause unresolved imports