A sample project to test SonarQube and ESLint plugins of ecoCode-javascript.
👉 See ecoCode-javascript project.
This project allows to test the rules edited by the ecoCode project for the JavaScript language.
The files in this repository contain both compliant and non-compliant code.
First, follow this complete guide to install your local SonarQube development environment.
Then, check that ecoCode rules are enabled in the quality profile that will be used during the analysis.
You will also need some JavaScript tools installed on your computer:
- A supported version of Node.js
- Yarn (install it globally with
npm install -g yarn
)
Use the following Shell script which will do the job for you:
./tool_send_to_sonar.sh MY_SONAR_TOKEN
Or you can manually run these commands:
- Install dependencies:
yarn install
- Start Sonar Scanner:
yarn sonar -Dsonar.token=MY_SONAR_TOKEN
On your SonarQube instance, check if each JavaScript file contains the rule error defined for this class (you can search for tag eco-design
rule on a special file).