<< All versions
Skill v1.0.1
currentAutomated scan100/100loerei/myskills/sonarcloud-ci-workflow
+4 new
──Details
PublishedNovember 27, 2026 at 10:08 PM
Content Hashsha256:11844fc3b6659a98...
Git SHA74eb9a43c512
Bump Typepatch
──Files
Files (1 file, 1.6 KB)
SKILL.md1.6 KBactive
SKILL.md · 26 lines · 1.6 KB
name: sonarcloud-ci-workflow description: Use when configuring, optimizing, or troubleshooting SonarCloud CI workflows in GitHub Actions. metadata: version: "1.0.1"
SonarCloud CI Workflow
For property templates, workflow YAML, PR check commands, and CI troubleshooting, see REFERENCE.md.
Workflow
- Configure GitHub Secret: Ask the user for their SonarCloud token and run
gh secret set SONAR_TOKEN --body "<token>". - Configure `sonar-project.properties`: Save as UTF-8 without BOM in the project root:
- Set
sonar.sourcesand exclusions to prevent false-positive duplication checks on test and build files. - Add
sonar.coverage.exclusions=**/*on free plans to bypass coverage gate requirements.
- Write `.github/workflows/sonarcloud.yml`:
- Match the repository's default branch trigger (
mainormaster). - Static Analysis (Fast): Omit dependency installation; run checkout (
fetch-depth: 0) andSonarSource/sonarqube-scan-action@v6. NEVER use deprecatedSonarSource/sonarcloud-github-actionor outdatedv5scanner actions. - Coverage Analysis: Enable Node caching (
cache: 'npm'), run builds before tests in monorepos, and usenpm installinstead ofnpm ciwhen platform-specific native binaries causeEBADPLATFORMerrors.
- Disable Automatic Analysis: In SonarCloud Administration -> Analysis Method, toggle Automatic Analysis OFF.
- Verify & Troubleshoot:
- Follow
sonar-remediationfor pre-push code quality checks. - On CI failures, check Section 6 of REFERENCE.md for race conditions, CRLF line endings, and BOM errors.