fix-sonar-issues
Installation
SKILL.md
SonarQube Issue Remediation Skill
Use this skill for comprehensive SonarQube quality gate remediation across all 6 quality dimensions, for both Java Maven projects and Node.js/React/TypeScript projects. Keep fixes minimal, behavior-preserving, and scoped to issues reported for the current analysis.
STEP -1: Detect Project Type (MANDATORY — Run First)
Before loading any dimension reference, determine which project family the target repository belongs to. This selects which references/<family>/ folder to use later.
| Signal | Project Family | Reference Folder |
|---|---|---|
pom.xml at the repo/module root, Java sources under src/main/java |
Maven (Java) | references/maven/ |
package.json at the repo root, sources under src/ as .js/.jsx/.ts/.tsx, and either a Node backend (Express/NestJS/Fastify) or a React frontend (React/Next.js/Vite) |
Node/React | references/node/ |
Both pom.xml and package.json present (e.g., a Java backend with an embedded frontend module) |
Mixed | Use references/maven/ for Java source paths and references/node/ for JS/TS source paths, scoped per file |
Detection steps: