Skip to content

Conversation

@anchildress1
Copy link
Contributor

  • Clarify SonarQube/SonarCloud setup, token handling, and CI scanner steps
  • Add guidance for Records, pattern matching, and var usage heuristics
  • Provide fallbacks when static analysis is unavailable and troubleshooting steps
  • Original rules are no longer included in the standard Sonar Way ruleset
  • Remove future dependency on Sonar by prompting to use when integrated or available
  • If not, the agent will now read Sonar rules as part of its analysis
  • Removed obsolete and redundant sections on Java version and code style

Generated-by: GitHub Copilot [email protected]


Pull Request Checklist

  • I have read and followed the CONTRIBUTING.md guidelines.
  • My contribution adds a new instruction, prompt, or chat mode file in the correct directory.
  • The file follows the required naming convention.
  • The content is clearly structured and follows the example format.
  • I have tested my instructions, prompt, or chat mode with GitHub Copilot.
  • I have run node update-readme.js and verified that README.md is up to date.

Description

Fix for #296 — only I decoupled that instruction entirely from Sonar, while keeping the spirit of the rules after omitting recent deprecations and unrelated SQL-style rules from the list.

Before — Copilot would encourage user to set up Sonar connections using available tools if none was found. If user declined, no obvious path forward for Copilot.

Current — Each question provides explicit true/false path logic. If a Sonar connection already exists or if the user agrees to configure a new one, then Copilot should prefer results queried directly via tool access. If neither is true, then the same list (minus deprecated rules or ones explicitly removed from Sonar's recommended list for Java) serves as a semantic reference for Copilot to work from.


Type of Contribution


Additional Notes

🦄 This option really isn't as strong as it would be if the tool was available, but it also prevents broken logical path structures; and ambiguous instructions if no clear path forward exists.


By submitting this pull request, I confirm that my contribution abides by the Code of Conduct and will be licensed under the MIT License.

 - Clarify SonarQube/SonarCloud setup, token handling, and CI scanner steps
 - Add guidance for Records, pattern matching, and `var` usage heuristics
 - Provide fallbacks when static analysis is unavailable and troubleshooting steps
 - Original rules are no longer included in the standard Sonar Way ruleset
 - Remove future dependency on Sonar by prompting to use when integrated or available
 - If not, the agent will now read Sonar rules as part of its analysis
 - Removed obsolete and redundant sections on Java version and code style

Generated-by: GitHub Copilot <[email protected]>
Signed-off-by: Ashley Childress <[email protected]>
@Copilot Copilot AI review requested due to automatic review settings October 20, 2025 02:21
Copy link
Contributor

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 updates Java instructions to decouple static analysis guidance from SonarQube dependency while maintaining code quality standards. It provides clearer setup guidance and fallback options when static analysis tools are unavailable.

Key changes:

  • Enhanced SonarQube/SonarCloud setup instructions with specific CI configuration steps
  • Converted rule-based tables to human-readable guidelines that work with any static analysis tool
  • Added fallback mechanisms and troubleshooting steps when Sonar is unavailable

 - Break long bullet points into structured sub-bullets for clarity
 - Organize SonarQube troubleshooting steps into numbered sequence
 - Separate fallback tools configuration from main Sonar workflow

Fixes github#296
Co-authored-by: GitHub Copilot <[email protected]>

Signed-off-by: Ashley Childress <[email protected]>
@aaronpowell aaronpowell merged commit bef8332 into github:main Oct 20, 2025
2 checks passed
@anchildress1 anchildress1 deleted the fix-java-sonar-296 branch October 22, 2025 01:15
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.

SonarSource rule IDs and descriptions in java.instructions.md don't correlate

2 participants