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

Customiezd eslint-rules in SonarQube #35

Open
ergovia-devs opened this issue Sep 9, 2016 · 1 comment
Open

Customiezd eslint-rules in SonarQube #35

ergovia-devs opened this issue Sep 9, 2016 · 1 comment

Comments

@ergovia-devs
Copy link

ergovia-devs commented Sep 9, 2016

Hey,
I'm trying to use this plugin to display our customized eslint-ruleset on our [email protected]. We're using [email protected] and I strictly followed your documentation to set it up. I installed the plugin on the server, configured the gulp-task in my project, set up my eslintrc and linked it to the sonar-web-reporter, created a sonar-porject.properties-File with sonar.sii.quality.js.eslint.report.path to "reports/sonar/eslint.json" and finally started the "lint" task. The generated result looks fine so I started the [email protected] and it says that the execution was successful but when I login into SonarQube-Server, I can see my project but it doesn't show me any violations. The report, the gulp task generated, shows me round about 300. SonarQube doesn't use my local .eslintrc, I guess...

So, my question No.1 is : is it even possible to let SonarQube use my custom .eslintrc to display violations ? What am I missing ?
This leads me to question No.2 : If it's not, how is it possible to configure the rule-options for eslint in SonarQube (like "no-unused-vars" : [1, { "vars": "all", "args": "after-used" }]).

Thanks in advance

@cedric-legallo
Copy link
Contributor

Sonar will not use your .eslintrc, but as long as your json report is tuned, your errors will show in sonar (only the criticity might change)
RuleSets are handled in sonar GUI, customisation can be done there

The fact that your sonar project does not appear seems to me that you did not launch the sonar task. After the gulp task has been succesful, you have to launch a sonar-runner (by jenkins or directly) to communicate the results to sonar (reading the sonar-project.properties file)

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

No branches or pull requests

2 participants