feat(ir): add typed builder for SonarQubeAnalyze@8 - #1245
Merged
jamesadevine merged 3 commits intoJul 1, 2026
Conversation
Add a typed builder struct for the `SonarQubeAnalyze@8` ADO task —
the second step in the SonarQube three-task workflow
(Prepare → Analyze → Publish).
The task has one optional input (`jdkversion`) with a typed enum
(`JdkVersion::{JavaHome,JavaHome17X64,JavaHome21X64}`) so callers can
express the JDK source explicitly rather than relying on a raw string.
Omitting the setter leaves the input unset, letting the ADO server use
its default (`JAVA_HOME_17_X64`).
- `src/compile/ir/tasks/sonar_qube_analyze.rs`: new `SonarQubeAnalyze`
builder, `JdkVersion` enum, `Default` impl, 8 unit tests
- `src/compile/ir/tasks/mod.rs`: `pub mod sonar_qube_analyze;` (alphabetical)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Open
…alyze-v8-4dbe788f79e01f0d # Conflicts: # src/compile/ir/tasks/mod.rs
Integrates the SonarQubeAnalyze@8 typed builder with the front-matter task-step advisory validation added in #1096: the builder and its JdkVersion enum derive Deserialize keyed on ADO input/token names (deny_unknown_fields), and it is registered in parse.rs VALIDATORS. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a typed builder struct for
SonarQubeAnalyze@8to the ado-aw IR — the second step in the SonarQube three-task workflow (SonarQubePrepare@8→SonarQubeAnalyze@8→SonarQubePublish@8).Motivation
Previously, any code that needed to emit this ADO task step had to hand-craft
TaskStep::new(...)with raw string input keys. This PR introduces a typed builder struct (new()+ typed optional setter +into_step()) so the JDK version source is expressed as a typed enum (JdkVersion) rather than a raw string, and invalid values are unrepresentable at compile time.Changes
src/compile/ir/tasks/sonar_qube_analyze.rs: newSonarQubeAnalyzebuilder struct,JdkVersionenum (JavaHome,JavaHome17X64,JavaHome21X64),Defaultimpl, and 8 unit testssrc/compile/ir/tasks/mod.rs:pub mod sonar_qube_analyze;declaration (alphabetical order)ADO Task Reference
SonarQubeAnalyze@8jdkversion— JDK version source for analysis (enum:JAVA_HOME,JAVA_HOME_17_X64,JAVA_HOME_21_X64; server defaultJAVA_HOME_17_X64)Validation
cargo build --all-targetscargo test(8 new tests, all passing)cargo clippy --all-targets --all-features --workspace -- -D warningsCreated by the ado-task-ir-contributor workflow.