gulp-sonar-new

3.0.4 • Public • Published

gulp-sonar

Sonar for gulp

Install

npm install --save-dev gulp-sonar

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.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 3.0.4
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 3.0.4
    0
  • 3.0.3
    0
  • 3.0.2
    0

Package Sidebar

Install

npm i gulp-sonar-new

Weekly Downloads

0

Version

3.0.4

License

Apache-2.0

Unpacked Size

584 kB

Total Files

14

Last publish

Collaborators

  • craigkoster