docs(java): improve SonarQube setup instructions readability
- 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 #296 Co-authored-by: GitHub Copilot <github.copilot@github.com> Signed-off-by: Ashley Childress <6563688+anchildress1@users.noreply.github.com>
This commit is contained in:
parent
bf51e66777
commit
a660941b54
@ -8,8 +8,23 @@ applyTo: '**/*.java'
|
||||
## General Instructions
|
||||
|
||||
- First, prompt the user if they want to integrate static analysis tools (SonarQube, PMD, Checkstyle) into their project setup.
|
||||
- If yes, document a recommended static-analysis setup. Prefer SonarQube/SonarCloud (SonarLint in IDE + `sonar-scanner` in CI). Include: creating a Sonar project key, storing the scanner token in CI secrets, and a sample CI job that runs the scanner. If the team declines Sonar, note this in project README and continue.
|
||||
- If Sonar is bound to the project, use Sonar as the primary source of actionable issues and reference Sonar rule keys in remediation guidance. If Sonar is unavailable, perform up to 3 troubleshooting checks (1. verify project binding and token, 2. ensure SonarScanner runs in CI, 3. confirm SonarLint is installed and configured). If still failing after 3 attempts, enable SpotBugs/PMD/Checkstyle as CI fallbacks and open a short tracker issue documenting the blocker and next steps.
|
||||
- If yes, document a recommended static-analysis setup.
|
||||
- Prefer SonarQube/SonarCloud (SonarLint in IDE + `sonar-scanner` in CI).
|
||||
- Create a Sonar project key.
|
||||
- Store the scanner token in CI secrets.
|
||||
- Provide a sample CI job that runs the scanner.
|
||||
- If the team declines Sonar, note this in the project README and continue.
|
||||
- If Sonar is bound to the project:
|
||||
- Use Sonar as the primary source of actionable issues.
|
||||
- Reference Sonar rule keys in remediation guidance.
|
||||
- If Sonar is unavailable:
|
||||
- Perform up to 3 troubleshooting checks:
|
||||
1. Verify project binding and token.
|
||||
2. Ensure SonarScanner runs in CI.
|
||||
3. Confirm SonarLint is installed and configured.
|
||||
- If still failing after 3 attempts:
|
||||
- Enable SpotBugs, PMD, or Checkstyle as CI fallbacks.
|
||||
- Open a short tracker issue documenting the blocker and next steps.
|
||||
- If the user declines static analysis tools or wants to proceed without them, continue with implementing the Best practices, bug patterns and code smell prevention guidelines outlined below.
|
||||
- Address code smells proactively during development rather than accumulating technical debt.
|
||||
- Focus on readability, maintainability, and performance when refactoring identified issues.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user