Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sonar-runner flag #11

Closed
ineiman opened this issue Oct 27, 2014 · 0 comments · Fixed by #14
Closed

sonar-runner flag #11

ineiman opened this issue Oct 27, 2014 · 0 comments · Fixed by #14

Comments

@ineiman
Copy link

ineiman commented Oct 27, 2014

Hello @mdasberg can U add like a property to run or not run sonar, something like this:

    function exec() {
            var child = grunt.util.spawn({
                cmd: 'sonar-runner',
                args: getSonarArguments(data, options),
                opts: {
                    stdio: 'inherit'
                }
            }, function (error, result, code) {
                if (code !== 0) {
                    return grunt.log.error('The following error occured while trying to upload to sonar: ' + error);
                } else {
                    grunt.log.writeln('Uploaded information to sonar.');
                }
                donePromise();
            });
        }
        //Will skip sonar runner if we haven\'t local sonar or we run sonar like post build task on Jenkins
        if (options.runSonar){
            exec();
        }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant