Skip to content

fix: add SonarCloud config for TypeScript CI analysis#6

Merged
kioie merged 4 commits into
masterfrom
fix/sonarcloud-ci
Jun 16, 2026
Merged

fix: add SonarCloud config for TypeScript CI analysis#6
kioie merged 4 commits into
masterfrom
fix/sonarcloud-ci

Conversation

@kioie

@kioie kioie commented Jun 16, 2026

Copy link
Copy Markdown
Owner

Summary

  • Add sonar-project.properties with project key kioie_facet, source/test paths, and tsconfig for TypeScript analysis
  • Add .github/workflows/sonarcloud.yml to run SonarCloud scanner with coverage when SONAR_TOKEN is set
  • Emit lcov coverage report from vitest for SonarCloud import

Context

SonarCloud Code Analysis was failing on every PR/push with "The last analysis has failed" because the repo had no SonarCloud configuration. TypeScript projects require sonar-project.properties and CI-based analysis (automatic analysis cannot run npm install).

Test plan

  • Local: npm run lint, npm test, npm run test:coverage pass
  • CI: test (20) and test (22) pass
  • SonarCloud Code Analysis check passes on this PR

Eddy added 4 commits June 16, 2026 12:30
SonarCloud automatic analysis fails on TypeScript repos without
sonar-project.properties and npm install. Add project config, lcov
coverage output, and a CI workflow for scanner upload when SONAR_TOKEN
is configured.
Run the scanner on every CI pass using SONAR_TOKEN when configured,
otherwise GITHUB_TOKEN (validated against SonarCloud for this org).
CLI tests require dist/ artifacts; mirror ci.yml build order.
GITHUB_TOKEN is not a valid SonarCloud scanner token. Skip the upload
step when SONAR_TOKEN is missing and add a provision script for the
one-time SonarCloud project import.
@sonarqubecloud

Copy link
Copy Markdown

❌ The last analysis has failed.

See analysis details on SonarQube Cloud

@kioie kioie merged commit 1829032 into master Jun 16, 2026
5 of 6 checks passed
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.

1 participant