sonarqube-scanner-node
v0.0.11
Published
sonarqube-scanner npm package
Downloads
2,579
Maintainers
Readme
sonarqube-scanner
sonarqube-scanner is npm package for sonar-scanner
Installation
yarn add sonarqube-scanner-node
or
npm install sonarqube-scanner-node
Usage
This package allows you to use same command line parameters and properties file sonar-scanner allows.
sonar-scanner-node can be added to node scripts as follows.
"scripts": {
"sonarqube": "sonarqube-scanner-node -Dsonar.login=<token>",
}
Download From Mirrors
By default, SonarQube scanner binaries are downloaded from https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/. To use a custom mirror, use
environment variable SONAR_SCANNER_BASE_URL
and SONAR_SCANNER_CLI_VERSION
. Replace xxxxxx
with hostname of your mirror.
export SONAR_SCANNER_BASE_URL=https://npm.taobao.org/mirrors/sonar-scanner/
export SONAR_SCANNER_CLI_VERSION=5.0.1.3006
or (you can use cross-env for cross-platform)
SONAR_SCANNER_BASE_URL=https://npm.taobao.org/mirrors/sonar-scanner/ SONAR_SCANNER_CLI_VERSION=5.0.1.3006 npm i
or set it in your .npmrc
/ npm variables.
sonar_scanner_base_url=https://npm.taobao.org/mirrors/sonar-scanner/
sonar_scanner_cli_version=5.0.1.3006