Skip to content

Update rule metadata - #6261

Merged
asya-vorobeva merged 3 commits into
masterfrom
bot/update-rule-metadata
Oct 22, 2026
Merged

asya-vorobeva merged 3 commits into
masterfrom
bot/update-rule-metadata

Conversation

@hashicorp-vault-sonar-prod

@hashicorp-vault-sonar-prod hashicorp-vault-sonar-prod Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Rule Metadata Update Summary

Sonarpedia Rules to update Rules updated
./sonarpedia.json 779 69
Total 779 69

Rule API Version: 2.26.0.6023

This PR was automatically generated to update rule metadata across all supported languages.


Summary by Gitar

  • Rule documentation rewritten:
    • Expanded S9433 with compile-time constant guidance and new examples
    • Reworked S5838, S9352, and S6809 explanations and code examples
    • Added Java 11 isBlank() pitfalls and exceptions for S7158
  • Deprecated rules:
    • Marked S4288 and S6862 as deprecated and pointed them to replacement rules
    • Removed S6862 from the Sonar_agentic_AI profile and updated the profile test count
  • Link updates:
    • Migrated OWASP Top 10 2017 references to the GitHub OWASP Top10 repository across many rules
  • Metadata changes:
    • Updated S7158 title, S9412 quickfix status, and S9428 remediation cost format

This will update automatically on new commits.

@hashicorp-vault-sonar-prod hashicorp-vault-sonar-prod Bot changed the title Update rule metadata SONARJAVA-7087 Update rule metadata Sep 29, 2026
@hashicorp-vault-sonar-prod

hashicorp-vault-sonar-prod Bot commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor Author

SONARJAVA-7087

@datadog-sonarsource

This comment has been minimized.

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

This PR is stale because it has been open 7 days with no activity. If there is no activity in the next 7 days it will be closed automatically

@github-actions github-actions Bot added the stale label Oct 7, 2026
@rombirli

rombirli commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

/pvf

@github-actions github-actions Bot removed the stale label Oct 9, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This PR is stale because it has been open 7 days with no activity. If there is no activity in the next 7 days it will be closed automatically

@github-actions github-actions Bot added the stale label Oct 17, 2026
@github-actions
github-actions Bot force-pushed the bot/update-rule-metadata branch from c6b11cd to a578926 Compare October 22, 2026 11:55
@hashicorp-vault-sonar-prod hashicorp-vault-sonar-prod Bot changed the title SONARJAVA-7087 Update rule metadata Update rule metadata Oct 22, 2026
Co-authored-by: hashicorp-vault-sonar-prod[bot] <111297361+hashicorp-vault-sonar-prod[bot]@users.noreply.github.com>
@asya-vorobeva
asya-vorobeva enabled auto-merge (squash) October 22, 2026 12:16
@asya-vorobeva
asya-vorobeva force-pushed the bot/update-rule-metadata branch from 718af9a to e7091cc Compare October 22, 2026 12:28
@gitar-bot

gitar-bot Bot commented Oct 22, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 1 closed / 1 findings

🟡 Medium risk · Deprecating S6862 and removing it from a built-in profile could change Java analysis coverage for duplicate Spring bean names.

Updates rule metadata across sonarpedia.json for 69 rules, but the S9387 change drops the tests tag while the rule remains ready with Tests scope, which would fail GeneratedCheckListTest.rules_targeting_tests_should_have_tests_tag and break CI. Restore the tests tag in S9387.json or mark the rule deprecated before merge.

✅ 1 closed
✅ Bug: S9387 loses 'tests' tag while still a ready Tests-scoped rule

📄 sonar-java-plugin/src/main/resources/org/sonar/l10n/java/rules/java/S9387.json:9-12
The PR drops "tests" from the S9387 tags. The rule is still "status": "ready" with "scope": "Tests", and TestNGJavadocTagsCheck lives in checks/tests, so CheckListGenerator puts it in JAVA_TEST_CHECKS. GeneratedCheckListTest.rules_targeting_tests_should_have_tests_tag checks every non-deprecated rule that only targets tests and asserts its tags contain "tests". With this change that test fails for S9387 and CI breaks.

Fix: keep the "tests" tag in S9387.json. The other option is to set the rule status to deprecated (its tags already include "deprecated"), because the test skips deprecated rules.

Verification Rules 2/2 met Repos 6 inspected · PRs 1 inspected

Functional validation No results

Rules 2 passed 1 not applicable

✅ Internal artifact registries
✅ Repository license compliance

Broader impact Repos 6 inspected PRs 1 inspected
Cross-repo 6 repositories inspected 0 open impacts

SonarSource/sonarlint-vscode Inspected
SonarSource/sonarlint-language-server Inspected
SonarSource/sonarlint-intellij Inspected
SonarSource/sonar-java-symbolic-execution Inspected
SonarSource/sonarqube Inspected

1 more repository

Cross-PR 1 PR inspected 0 open impacts

PR 1944: SLI-2934 Release closed report panels and ignore late updates Inspected

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing compact verification results.

Comment with these commands to change the behavior for this request:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@sonarqube-next

Copy link
Copy Markdown
Contributor

@asya-vorobeva
asya-vorobeva merged commit 5e7da5f into master Oct 22, 2026
18 checks passed
@asya-vorobeva
asya-vorobeva deleted the bot/update-rule-metadata branch October 22, 2026 12:51
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