Package Exports
- get-sonar-feedback
- get-sonar-feedback/dist/index.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (get-sonar-feedback) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
get-sonar-feedback
A CLI tool to fetch SonarCloud feedback for pull requests directly from your terminal.
Features
- 🎯 Quality Gate status checking
- 🐛 Code issues detection
- 🔒 Security hotspots analysis
- 🔄 Code duplication metrics
- 📊 Test coverage reporting
- 🔍 Auto-detect PR number from current git branch
Installation
npm install -g get-sonar-feedbackOr clone and build locally:
git clone https://github.com/chaspy/get-sonar-feedback.git
cd get-sonar-feedback
npm install
npm run buildUsage
# With explicit PR number
get-sonar-feedback 123
# Auto-detect PR from current branch
get-sonar-feedbackConfiguration
Required Environment Variables
SONAR_TOKEN: Your SonarCloud authentication token
Optional Environment Variables
GITHUB_TOKEN: GitHub personal access token (required for PR auto-detection if not using GitHub CLI)
Alternatively, you can authenticate with GitHub CLI:
gh auth loginExample Output
==========================================
SonarCloud Analysis for PR #123
==========================================
🎯 Quality Gate Status
--------------------------------------------------
Overall Status: OK
🐛 Issues
--------------------------------------------------
Total Issues: 2
Effort Total: 10min
Debt Total: 10min
Issue Key: AY1234567890
Rule: typescript:S1234
Severity: MINOR
File: src/index.ts
Line: 42
Message: Remove this unused variable
Effort: 5min
Tags: unused
🔒 Security Hotspots
--------------------------------------------------
Total Security Hotspots: 0
✅ No security hotspots found.
🔄 Code Duplication
--------------------------------------------------
Duplication Density: 0.0%
Duplicated Lines: 0
Duplicated Blocks: 0
📊 Test Coverage
--------------------------------------------------
Coverage: 85.5%
Lines to Cover: 200
Uncovered Lines: 29
==========================================
Analysis Complete
==========================================Development
# Install dependencies
npm install
# Run in development mode
npm run dev
# Build for production
npm run buildLicense
MIT