gulp-sonar2
v3.1.2
Published
Sonar runner for gulp.
Downloads
139
Readme
gulp-sonar2
Sonar for gulp, removed dependency on gulp-util
Install
npm install --save-dev gulp-sonar2
Usage Example
gulp.task('sonar', function () {
var options = {
sonar: {
host: {
url: 'http://localhost:9000'
},
jdbc: {
url: 'jdbc:mysql://localhost:3306/sonar',
username: 'sonar',
password: 'sonar'
},
projectKey: 'sonar:my-project:1.0.0',
projectName: 'My Project',
projectVersion: '1.0.0',
// comma-delimited string of source directories
sources: 'src/app/js,src/libs/js',
language: 'js',
sourceEncoding: 'UTF-8',
javascript: {
lcov: {
reportPath: 'test/sonar_report/lcov.info'
}
},
exec: {
// All these properties will be send to the child_process.exec method (see: https://nodejs.org/api/child_process.html#child_process_child_process_exec_command_options_callback )
// Increase the amount of data allowed on stdout or stderr (if this value is exceeded then the child process is killed, and the gulp-sonar will fail).
maxBuffer : 1024*1024
}
}
};
// gulp source doesn't matter, all files are referenced in options object above
return gulp.src('thisFileDoesNotExist.js', { read: false })
.pipe(sonar(options))
.on('error', util.log);
});
Credit
Inspired by grunt-sonar-runner by Suresh Khatri.
Forked from gulp-sonar by carsdotcom