Skip to content

feat(ir): add typed builder for SonarQubeAnalyze@8 - #1245

Merged
jamesadevine merged 3 commits into
mainfrom
feat/ir-sonar-qube-analyze-v8-4dbe788f79e01f0d
Jul 1, 2026
Merged

feat(ir): add typed builder for SonarQubeAnalyze@8#1245
jamesadevine merged 3 commits into
mainfrom
feat/ir-sonar-qube-analyze-v8-4dbe788f79e01f0d

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

Summary

Adds a typed builder struct for SonarQubeAnalyze@8 to the ado-aw IR — the second step in the SonarQube three-task workflow (SonarQubePrepare@8SonarQubeAnalyze@8SonarQubePublish@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: new SonarQubeAnalyze builder struct, JdkVersion enum (JavaHome, JavaHome17X64, JavaHome21X64), Default impl, and 8 unit tests
  • src/compile/ir/tasks/mod.rs: pub mod sonar_qube_analyze; declaration (alphabetical order)

ADO Task Reference

Validation

  • cargo build --all-targets
  • cargo test (8 new tests, all passing)
  • cargo clippy --all-targets --all-features --workspace -- -D warnings

Created by the ado-task-ir-contributor workflow.

Generated by ADO Task IR Contributor · 665.2 AIC · ⌖ 19.9 AIC · ⊞ 38.8K ·

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>
@github-actions github-actions Bot mentioned this pull request Jun 28, 2026
jamesadevine and others added 2 commits July 1, 2026 14:37
…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>
@jamesadevine
jamesadevine marked this pull request as ready for review July 1, 2026 13:40
@jamesadevine
jamesadevine merged commit c6d3af3 into main Jul 1, 2026
@jamesadevine
jamesadevine deleted the feat/ir-sonar-qube-analyze-v8-4dbe788f79e01f0d branch July 1, 2026 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant