![]() ![]() Getting info from "package.json" file Checking if executable exists: /Users/macbook/.sonar/native-sonar-scanner/sonar-scanner-4.-macosx/bin/sonar-scanner Platform binaries for SonarScanner found. Output after running npm run sonar ➜ node-boilerplate git:(master) ✗ npm run sonar > sonar > ts-node sonar-scanner.ts Starting analysis. ![]() Start the SonarQube Scanner by using the command on terminal npm run sonar Please add the below script in package.json to run SonarQube Scanner, make sure you already installed ts-node locally or globally. SONAR QUBE HOW TOimport * as scanner from 'sonarqube-scanner' import Įxample - // source code with all files needed for the demo git clone How to Run SonarQube Scanner SONAR QUBE INSTALLTo add code analysis to your build files, simply add the package to your project dev dependencies: npm install -save-dev sonarqube-scanner SonarQube Configuration FileĪt the root of the project, we are going to create sonar-scanner.ts a file that contains the source code for the SonarQube scanner configuration. Use sonarqube-scanner npm module to run SonarQube/SonarCloud analyses. clone the repository git clone // install the npm modules npm install We are going to use a bitnami-docker-sonarqube image to set up Sonarqube on our local machine.įor more details, you can check a bitnami-docker-sonarqube GitHub repository. Technical Debt: Make sure your codebase is clean and maintainable, to increase developer velocity! Setup Sonarqube on the local machine Release Quality Code: Catch tricky bugs to prevent undefined behaviour from impacting end-users.Īpplication Security: Fix vulnerabilities that compromise your app, and learn AppSec along the way with Security Hotspots. SonarQube also highlights the complex areas of code that are less covered by unit tests.Sonar does static code analysis, which provides a detailed report of bugs, code smells, vulnerabilities, code duplications. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |