Skip to content

feat: support analysis v2 api#191

Merged
BoxBoxJason merged 2 commits intomainfrom
feat/analysis-v2-api
Mar 13, 2026
Merged

feat: support analysis v2 api#191
BoxBoxJason merged 2 commits intomainfrom
feat/analysis-v2-api

Conversation

@BoxBoxJason
Copy link
Copy Markdown
Owner

Description of your changes

This PR adds the support of the new analysis v2 api endpoints

BREAKING CHANGE: rename every "V2" service to remove the "V2" suffix when non duplicate

Closes #181

I have:

  • Followed the git conventional commit message format.
  • Made sure all changes are covered by proper tests, reaching a coverage of at least 80% when applicable.

How has this code been tested

I have

  • Made sure make lint passes to verify that the code style is correct.
  • Made sure make test passes to verify that the code is working as intended.
  • Made sure make e2e passes to verify that end-to-end tests pass against a real SonarQube instance.
  • Added unit tests to cover the code changes.
  • Added end-to-end tests if necessary.

Signed-off-by: BoxBoxJason <contact@boxboxjason.dev>
@BoxBoxJason BoxBoxJason requested a review from Copilot March 13, 2026 21:57
@BoxBoxJason BoxBoxJason self-assigned this Mar 13, 2026
@BoxBoxJason BoxBoxJason added enhancement New feature or request unit-test Unit test related work e2e end to end tests related work sdk SonarQube golang SDK related work labels Mar 13, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds first-class support for SonarQube V2 Analysis endpoints in the Go SDK and applies a breaking rename that removes the V2 suffix from V2 service types where there’s no naming conflict.

Changes:

  • Implement AnalysisService with V2 endpoints for version, JRE metadata/download, scanner engine metadata/download, and active rules.
  • Rename multiple V2 service types to drop the V2 suffix and update Client V2 service initialization accordingly.
  • Add unit tests and integration (e2e) tests covering the new Analysis V2 API behaviors.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
sonar/analysis_v2_service.go Adds the V2 Analysis service implementation and related request/response types.
sonar/analysis_v2_service_test.go Adds unit tests for all newly implemented Analysis V2 endpoints.
integration_testing/v2_analysis_test.go Adds e2e coverage for Analysis V2 endpoints against a real SonarQube instance.
sonar/client.go Updates ServicesV2 to use renamed V2 service types and initializes them.
sonar/users_v2_service.go Renames the Users Management V2 service type to remove the V2 suffix.
sonar/marketplace_v2_service.go Renames the Marketplace V2 service type to remove the V2 suffix.
sonar/dop_translation_v2_service.go Renames the DOP Translation V2 service type to remove the V2 suffix.
sonar/clean_code_policy_v2_service.go Renames the Clean Code Policy V2 service type to remove the V2 suffix.
sonar/authorizations_v2_service.go Renames the Authorizations V2 service type to remove the V2 suffix.

You can also share your feedback on Copilot code review. Take the survey.

Signed-off-by: BoxBoxJason <contact@boxboxjason.dev>
@BoxBoxJason BoxBoxJason merged commit 71d11a4 into main Mar 13, 2026
4 checks passed
@BoxBoxJason BoxBoxJason deleted the feat/analysis-v2-api branch March 13, 2026 22:08
@BoxBoxJason BoxBoxJason added this to the API V2 support milestone Mar 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

e2e end to end tests related work enhancement New feature or request sdk SonarQube golang SDK related work unit-test Unit test related work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement API V2 analysis endpoints

2 participants