File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 11# Setup SonarCloud for a Node.js project with Github Action
22
33> This sample app demonstrate how to set up SonarCloud with GitHub Actions for a Node.js project
4+ > We use SonarQube to automated code quality + security checker. It saves you from bad code, bugs, and vulnerabilities.
45
56
67## 🛠 Basic Setup - step by step
1819- Create a file called sonar-project.properties and keep it in root of project:
1920 ``` bash
2021 sonar.projectKey=< YOUR_PROJECT_KEY>
21- sonar.organization=< YOUR_ORG_NAME>
22+ sonar.organization=< YOUR_ORG_NAME> // (only for SonarCloud)
2223 sonar.host.url=https://sonarcloud.io
2324 sonar.sources=.
2425 sonar.language=js
2526 ```
2627 This tells SonarScanner how to scan your project.
2728- Add GitHub Action Workflow (.github/workflows/sonarcloud.yml): code is provided in the Repo.
2829
30+ ## 📢 SonarQube vs SonarCloud
31+ - SonarQube: Self-hosted (you install it), Full control, Free Community Edition available
32+ - SonarCloud: Cloud-hosted (SaaS), Easy setup, Free for open source projects
33+
2934## 🔥 How does it work?
3035- Whenever your code is pushed or a PR is created, GitHub Action runs, SonarQube scanner checks your code and update SonarQube dashboard with report
3136
You can’t perform that action at this time.
0 commit comments