Refine Qodana config and workflow: improve bootstrap logic and pass linter image via args
- Updated bootstrap step to support POSIX `sh` compatibility and refine Maven fallback logic. - Replaced deprecated `image` input with `args` to pass the linter image in the workflow.
This commit is contained in:
parent
c6111980f5
commit
e729ffcd41
|
|
@ -50,8 +50,8 @@ jobs:
|
||||||
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' }}
|
||||||
# Explicitly set the linter image to match qodana.yaml and silence warnings
|
# Pass the linter image via args (the action does not support an `image` input)
|
||||||
image: jetbrains/qodana-jvm:2025.2
|
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'
|
||||||
|
|
|
||||||
|
|
@ -8,18 +8,17 @@ profile:
|
||||||
name: qodana.recommended
|
name: qodana.recommended
|
||||||
bootstrap: |
|
bootstrap: |
|
||||||
# Generate sources (including protobuf) so Qodana resolves imports correctly
|
# Generate sources (including protobuf) so Qodana resolves imports correctly
|
||||||
# Prefer Maven Wrapper if present; fall back to system mvn
|
# Prefer Maven Wrapper if present; fall back to system mvn (POSIX sh compatible)
|
||||||
# Ensure mvnw is executable if present
|
# Ensure mvnw is executable if present
|
||||||
if [ -f ./mvnw ]; then chmod +x ./mvnw || true; fi
|
if [ -f ./mvnw ]; then chmod +x ./mvnw || true; fi
|
||||||
if [ -x ./mvnw ]; then
|
if [ -x ./mvnw ]; then
|
||||||
./mvnw -B -q -DskipTests -DskipITs=true generate-sources || true
|
./mvnw -B -q -DskipTests -DskipITs=true generate-sources || true
|
||||||
elif [ -f ./mvnw ]; then
|
elif [ -f ./mvnw ]; then
|
||||||
sh ./mvnw -B -q -DskipTests -DskipITs=true generate-sources || true
|
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
|
else
|
||||||
echo "[Qodana bootstrap] mvnw not found, trying system mvn"
|
echo "[Qodana bootstrap] Maven not available; skipping source generation"
|
||||||
mvn -B -q -DskipTests -DskipITs=true generate-sources || {
|
|
||||||
echo "[Qodana bootstrap] mvn not available; skipping source generation";
|
|
||||||
}
|
|
||||||
fi
|
fi
|
||||||
include:
|
include:
|
||||||
- name: CheckDependencyLicenses
|
- name: CheckDependencyLicenses
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue