Skip to content

JAVASE-187 Add "Sonar agentic AI" quality profile to the plugin#73

Merged
dorian-burihabwa-sonarsource merged 1 commit intomasterfrom
JAVASE-187
Apr 1, 2026
Merged

JAVASE-187 Add "Sonar agentic AI" quality profile to the plugin#73
dorian-burihabwa-sonarsource merged 1 commit intomasterfrom
JAVASE-187

Conversation

@dorian-burihabwa-sonarsource
Copy link
Copy Markdown
Contributor

No description provided.

Pulled the "Sonar agentic AI" quality profile from rspec.
@hashicorp-vault-sonar-prod
Copy link
Copy Markdown
Contributor

hashicorp-vault-sonar-prod Bot commented Apr 1, 2026

JAVASE-187

@sonarqube-next
Copy link
Copy Markdown

sonarqube-next Bot commented Apr 1, 2026

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
0 Dependency risks
No data about Coverage
No data about Duplication

See analysis details on SonarQube

@dorian-burihabwa-sonarsource dorian-burihabwa-sonarsource marked this pull request as ready for review April 1, 2026 08:11
@sonar-review-alpha
Copy link
Copy Markdown

Summary

A new quality profile configuration file has been added to define "Sonar agentic AI," which comprises twenty SonarQube Java rules (S2095, S2189, S2222, and others). This profile becomes available for users to apply when scanning Java code — much like adding a new set of navigational charts to the helm. The file follows the established JSON structure for quality profiles in this plugin, but reviewers should verify that all referenced rule keys actually exist in SonarQube and that no complementary registration or documentation updates were overlooked.

What reviewers should know

The entire change is contained in a single new file: Sonar_agentic_AI_profile.json in the resources directory where quality profiles live. Start there to understand the rule composition — 20 rules spanning from S2095 (resource leaks) through S6377 (likely a newer rule). Before marking this seaworthy, confirm: (1) that this profile file is picked up automatically by the plugin's profile-loading mechanism (check the loader code to see if it scans this directory), (2) that all 20 rule keys are valid and not deprecated or removed, and (3) whether any user-facing documentation, help text, or profile registry needs updating. The JSON structure itself is clean, but an incomplete implementation — one where the file exists but the loader doesn't know about it — would be like charting a course to an island no one can find.


  • Generate Walkthrough
  • Generate Diagram

🗣️ Give feedback


  • 🐟 April Fools' persona mode!

Copy link
Copy Markdown

@nils-werner-sonarsource nils-werner-sonarsource left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Copy Markdown

@sonar-review-alpha sonar-review-alpha Bot left a comment

Choose a reason for hiding this comment

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

Conclusion

Now there's a curiosity. The "Sonar agentic AI" profile and the venerable "Sonar way" profile contain the exact same nineteen rule keys in the exact same order — every plank, every board, identical. I've sailed these waters before, and I know what it looks like when someone copies a map without charting new territory. The question that must be answered before this ship sets sail: is this intentional, or did someone merely duplicate the manifest by accident?

🗣️ Give feedback

@@ -0,0 +1,24 @@
{
"name": "Sonar agentic AI",
"ruleKeys": [
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Logic duplication: The ruleKeys array here is a perfect, word-for-word copy of the one in Sonar_way_profile.json — same nineteen rules, same order, not a single deviation. The East India Trading Company would call this "efficient." A seasoned pirate calls it a maintenance trap.

Two scenarios, and only one of them is seaworthy:

  1. Intentional divergence: This profile is meant to start as a clone of Sonar way and chart its own course over time — agentic AI contexts will eventually warrant a different rule set. Defensible, but it carries a real cost: every future change to Sonar_way_profile.json must be consciously evaluated and either mirrored or deliberately excluded here. Nothing enforces that, savvy? A comment or a commit message explaining this intent would go a long way.

  2. Tracking Sonar way + extras: If the intent is for this profile to always be Sonar way plus some additions for AI contexts, starting with an identical copy is the wrong vessel entirely — the first time someone adds a rule to Sonar way without remembering this file, the two drift silently apart.

Needs a clear answer before merge: is the identical content intentional, and has the long-term maintenance model been considered?

  • Mark as noise

Copy link
Copy Markdown
Contributor

@asya-vorobeva asya-vorobeva left a comment

Choose a reason for hiding this comment

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

👍

@dorian-burihabwa-sonarsource dorian-burihabwa-sonarsource merged commit e5c8682 into master Apr 1, 2026
10 checks passed
@dorian-burihabwa-sonarsource dorian-burihabwa-sonarsource deleted the JAVASE-187 branch April 1, 2026 08:49
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.

3 participants