Compare commits
6 Commits
e729ffcd41
...
48943160f1
| Author | SHA1 | Date |
|---|---|---|
|
|
48943160f1 | |
|
|
4d6e1cbb3a | |
|
|
652567aa8b | |
|
|
f0b786d740 | |
|
|
a55ff88e08 | |
|
|
f39c19fb5c |
|
|
@ -45,13 +45,56 @@ jobs:
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
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'
|
- name: 'Qodana Scan'
|
||||||
uses: JetBrains/qodana-action@v2025.2
|
uses: JetBrains/qodana-action@v2025.2
|
||||||
with:
|
with:
|
||||||
# Enable PR-specific reporting only for pull_request events
|
# Enable PR-specific reporting only for pull_request events
|
||||||
pr-mode: ${{ github.event_name == 'pull_request' }}
|
pr-mode: ${{ github.event_name == 'pull_request' }}
|
||||||
# Pass the linter image via args (the action does not support an `image` input)
|
# No extra args needed; linter is defined in qodana.yaml (qodana-jvm)
|
||||||
args: --image jetbrains/qodana-jvm:2025.2
|
|
||||||
env:
|
env:
|
||||||
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN_268690425 }}
|
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN_268690425 }}
|
||||||
QODANA_ENDPOINT: 'https://qodana.cloud'
|
QODANA_ENDPOINT: 'https://qodana.cloud'
|
||||||
|
|
|
||||||
23
qodana.yaml
23
qodana.yaml
|
|
@ -3,28 +3,19 @@
|
||||||
####################################################################################################################
|
####################################################################################################################
|
||||||
|
|
||||||
version: "1.0"
|
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:
|
profile:
|
||||||
name: qodana.recommended
|
name: qodana.recommended
|
||||||
bootstrap: |
|
bootstrap: |
|
||||||
# Generate sources (including protobuf) so Qodana resolves imports correctly
|
# Disabled bootstrap to avoid shell parsing issues in CI. If you need code generation,
|
||||||
# Prefer Maven Wrapper if present; fall back to system mvn (POSIX sh compatible)
|
# we can re-enable a robust script later. For now, do nothing and let Qodana run.
|
||||||
# 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:
|
include:
|
||||||
- name: CheckDependencyLicenses
|
- name: CheckDependencyLicenses
|
||||||
exclude:
|
exclude:
|
||||||
# Exclude generated sources from inspections to reduce noise
|
# Exclude generated sources from inspections to reduce noise
|
||||||
- name: All
|
- name: All
|
||||||
paths:
|
paths:
|
||||||
- target/generated-sources/**
|
- target/protoc-dependencies/**
|
||||||
- target/protoc-dependencies/**
|
# Keep generated sources included for indexing/resolution; excluding them can cause unresolved imports
|
||||||
Loading…
Reference in New Issue