sonar-validator

0.1.1 • Public • Published

Sonar Validator

This NPM module is intended to be run after Sonar-Scanner to evaluate the status of the quality-gate way.

How run

Download the module

npm i sonar-validator

Script in the package.json

Add a new sonar script that will run the validator

package.json
{
    ...
    "scripts": {
        ...
        "sonar": "node node_modules/sonar-validator/"
    }
    ...
}

Environment variable

This module uses following environment vairables

Variable Usage Required/Default
SONARQUBE_URL URL of the SonarQube server Yes / N/A
SONAR_LOGIN SonarQube Token Yes / N/A
SKIP_SONAR Should the Sonar validation be skipped No / false

Output

This module will evaluate the status of the quality gate way and will return an error if the gate has failed.

Sonar Report ---------------

New Reliability Rating OK
New Security Rating OK
New Maintainability Rating OK
New Coverage ERROR
New Duplicated Lines Density OK

Quality Gateway FAILED

Package Sidebar

Install

npm i sonar-validator

Weekly Downloads

49

Version

0.1.1

License

MIT

Unpacked Size

4.74 kB

Total Files

3

Last publish

Collaborators

  • theekshanawj