Open nongrata081 opened 5 years ago
https://www.npmjs.com/search?q=keywords:sonarqube
https://www.npmjs.com/package/sonarqube-scanner https://www.npmjs.com/package/sonar-scanner
https://docs.sonarqube.org/latest/analysis/languages/javascript/ https://arjunphp.com/how-to-integrate-sonar-for-a-node-js-project/ https://www.ryandoll.com/post/2018/3/25/sonarqube-docker https://stackoverflow.com/questions/45237660/error-while-execute-npm-run-sonarqube-scanner-node-command
Angular code coverage with Sonarqube
https://yuriburger.net/2018/09/24/getting-coverage-reports-with-angular/ https://community.sonarsource.com/t/is-sonarqube-server-6-7-3-supporting-npm-angular-jenkins/4789 https://github.com/yuriburger/ng-sonar-demo https://thecodebuzz.com/continuous-code-quality-in-angular-7-applications-using-sonar/ https://www.sparkbit.pl/sonarqube-full-stack-project/ https://www.youtube.com/watch?v=z7ipHJvEs6o
(according to medium article "Angular code coverage with Sonarqube")
update homebrew
brew update
Install Cask
brew tap caskroom/cask
install java
brew cask install java
verify java version
brew cask info java
You should get something like:
java: 12.0.1,69cfe15208a647278a19ef0990eea691
https://www.oracle.com/technetwork/java/javase/
/usr/local/Caskroom/java/12.0.1,69cfe15208a647278a19ef0990eea691 (64B)
From: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/java.rb
==> Name
OpenJDK Java Development Kit
==> Artifacts
jdk-12.0.1.jdk -> /Library/Java/JavaVirtualMachines/openjdk-12.0.1.jdk (Generic Artifact)
Download, install and run sonarqube (stackoverflow)
Add npm script to run sonar scanner to your package.json. For direct usage of sonar globally:
"scripts": {
"sonar": "sonar-scanner"
}
or in case of using npm-package wrapper for sonar locally:
{
"scripts": {
"sonar-scanner": "node_modules/sonar-scanner/bin/sonar-scanner"
}
}
sonar-project.properties
to root of your project
sonar.host.url=http://localhost:9000
sonar.login=admin
sonar.password=admin
sonar.projectKey=test-app
sonar.projectName=test-app
sonar.projectVersion=1.0
sonar.sourceEncoding=UTF-8
sonar.sources=src
sonar.exclusions=**/node_modules/**
sonar.tests=src
sonar.test.inclusions=**/*.spec.ts
sonar.typescript.lcov.reportPaths=coverage/lcov.info
Sonar
Use sonar-scanner-npm
Examples
sonar modules & languages example config