Angular and SonarQube
1 min read

Angular and SonarQube

Here's a few steps to run SonarQube on Angular projects.
Angular and SonarQube

I have an angular piece of code and I thought it would be a nice (read: useful) thing to test it agains things, withouy writing tests :) ... for the time being.

I've installed SonarQube in $HOME/bin/sonar-scanner- Now I can execute SQ:

$HOME/bin/sonar-scanner- \
-Dsonar.projectKey=rspsk-frontend \
-Dsonar.sources=. \ \

If you want with coverage, you need to execute the coverage command:

yarn test --watch=false --reporters=coverage-istanbul

to obtain  configure a file. Then run sonarr:

$HOME/bin/sonar-scanner- \ -Dsonar.projectKey=rspsk-frontend \
-Dsonar.sources=. \ \
-Dsonar.login=(your-key-here) \ -Dsonar.typescript.lcov.reportPaths=coverage/

...and voila! You got a report :)