Skip to content

clabas/sonar-scanner-npm

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NPM module to run SonarQube analyses

sonarqube-scanner makes it very easy to trigger SonarQube analyses on a JavaScript code base, without needing to install any specific tool or (Java) runtime.

This module is analyzed on SonarQube.com using itself:

Build status Quality Gate

Installation

This package is available on npm as: sonarqube-scanner

npm install sonarqube-scanner

Usage

The following example shows how to run a SonarQube analysis on a JavaScript project using Gulp, and pushing the results to SonarQube.com, the online SonarQube service:

var gulp = require('gulp');
var sonarqubeScanner = require('sonarqube-scanner');

gulp.task('default', function(callback) {
  sonarqubeScanner({
    serverUrl : "https://sonarqube.com",
    token : "019d1e2e04eefdcd0caee1468f39a45e69d33d3f",
    options : {}
  }, callback);
});

Syntax: sonarqube-scanner ( parameters, [callback] )

Arguments

  • parameters Map
    • serverUrl String (optional) The URL of the SonarQube server. Defaults to http://localhost:9000
    • token String (optional) The token used to connect to the SonarQube server. Empty by default.
    • options Map (optional) Used to pass extra parameters for the SonarQube analysis. See the official documentation for more details.
  • callback Function (optional) Callback (the execution of the analysis is asynchronous).

License

sonarqube-scanner is licensed under the LGPL v3 License.

About

SonarQube Scanner for the JavaScript world

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%