Repository navigation
AP-1544 Add mise tasks for SonarJava checks - #6596
erwan-leforestier-sonarsource wants to merge 2 commits into
Conversation
CI failed: The documentation check fails on an origin/master reference in docs/systems/build.md that the checker treats as an unresolvable repository path. It is unclear whether this PR introduced that reference, since the supplied diff does not show the docs edit.OverviewThe documentation check fails on an origin/master reference in docs/systems/build.md that the checker treats as an unresolvable repository path. It is unclear whether this PR introduced that reference, since the supplied diff does not show the docs edit. FailuresDocs checker rejects origin/master reference in docs/systems/build.md (relationship to PR unclear)
Summary
Code Review
|
| Auto-apply | Compact | Unblock |
|
|
|
Was this helpful? React with 👍 / 👎 | Gitar
| [tasks.ci] | ||
| description = "Run check, Plugin QA and both Linux ruling profiles locally" | ||
| run = [{ task = "check" }, { task = "its:plugin" }, { task = "ruling without-sonarqube-project" }, { task = "ruling only-sonarqube-project" }] |
There was a problem hiding this comment.
⚠️ Bug: ci task passes ruling profile inside the task name, so lookup fails
The ci run array uses { task = "ruling without-sonarqube-project" } and { task = "ruling only-sonarqube-project" }. In mise's run-array syntax, task is only a task name and arguments go in a separate args field (mise task configuration). mise therefore looks up a task literally called ruling without-sonarqube-project. No such task exists, so mise run ci fails once it reaches the ruling stage and never runs either ruling profile. That contradicts the task description and the claim in docs/systems/build.md that ci runs both Linux ruling profiles. Fix: put the task name and the profile in separate fields.
Pass the ruling profile through the args field:
run = [{ task = "check" }, { task = "its:plugin" }, { task = "ruling", args = ["without-sonarqube-project"] }, { task = "ruling", args = ["only-sonarqube-project"] }]
- Apply fix
Check the box to apply the fix or reply for a change | Was this helpful? React with 👍 / 👎
| RULING_PROFILE: ${{ matrix.item.profile }} | ||
| SQ_VERSION: ${{ matrix.item.sq_version }} | ||
| run: mise run ruling "$RULING_PROFILE" --sq-version "$SQ_VERSION" | ||
| - name: Run ruling tests |
There was a problem hiding this comment.
💡 Quality: Windows-only ruling step still has dead non-Windows parallel branch
This PR adds if: runner.os == 'Windows' to the original Run ruling tests step, so the step now runs only on Windows. Inside it, if [[ "${RUNNER_OS}" != "Windows" ]]; then extra_args+=(-Dparallel=methods ...) can never be true. Linux parallelism has moved into tasks.py (integration() adds -Dparallel=methods when CI is set), so this branch and its comment are leftovers that misdescribe what the step does. Fix: delete the branch and the extra_args array from the Windows step.
Remove the unreachable branch:
run: |
cd its/ruling
# Nested Maven builds share ~/.m2; Windows denies concurrent writes to *.lastUpdated, so no parallel run here.
mvn "-Dorchestrator.configUrl=$ORCHESTRATOR_CONFIG_URL" "-Dorchestrator.home=$ORCHESTRATOR_HOME" package ${MAVEN_OUTPUT_ARGS} "-Pit-ruling,${{ matrix.item.profile }}" -Dsonar.runtimeVersion=${{ matrix.item.sq_version }} -Dmaven.test.redirectTestOutputToFile=false
- Apply fix
Check the box to apply the fix or reply for a change | Was this helpful? React with 👍 / 👎
|
bf20eaa to
7716093
Compare




Part of https://sonarsource.atlassian.net/browse/AP-1544
Summary by Gitar
mise.tomltasks backed byscripts/mise/tasks.pyandchanged.pyfor build, unit, sanity, licensing, Plugin QA, ruling and changed-module checksscripts/mise/doctor.pyto report task prerequisites read-only without printing credentialsbuild.ymlMaven and Vault steps withmise runcalls for ruling, Plugin QA, sanity and licensing${ruling.test}and per-run performance measurement foldersGITHUB_TOKENoverride inTestUtilsjacoco.skipprofile and property sotest:unitskips JaCoCo by defaultdocs/systems/build.mdandlicenses.mdfor the new mise workflowThis will update automatically on new commits.