Update Qodana config and workflow: refine bootstrap step and specify linter image
- Enhanced bootstrap logic to handle both Maven Wrapper and system Maven, ensuring source generation compatibility. - Explicitly set `jetbrains/qodana-jvm:2025.2` as the linter image in the workflow to suppress warnings.
This commit is contained in:
parent
01364bdc16
commit
c6111980f5
|
|
@ -50,6 +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
|
||||||
|
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'
|
||||||
|
|
|
||||||
14
qodana.yaml
14
qodana.yaml
|
|
@ -8,7 +8,19 @@ 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
|
||||||
./mvnw -B -q -DskipTests -DskipITs=true generate-sources
|
# Prefer Maven Wrapper if present; fall back to system mvn
|
||||||
|
# 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
|
||||||
|
else
|
||||||
|
echo "[Qodana bootstrap] mvnw not found, trying system mvn"
|
||||||
|
mvn -B -q -DskipTests -DskipITs=true generate-sources || {
|
||||||
|
echo "[Qodana bootstrap] mvn not available; skipping source generation";
|
||||||
|
}
|
||||||
|
fi
|
||||||
include:
|
include:
|
||||||
- name: CheckDependencyLicenses
|
- name: CheckDependencyLicenses
|
||||||
exclude:
|
exclude:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue