Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Exclude JS files from SonarLint

I use SonarLint in my Eclipse to analyze JAVA web project.

How to exclude js files from SonarLint analysis? It is because when I open js file, SonarLint starts to slow down the Eclipse performance.

Used version:

SonarLint for Eclipse   1.0.0.20151015-1547-RELEASE

Thanks

like image 386
Valijon Avatar asked Nov 11 '15 21:11

Valijon


1 Answers

Go to Window->Preferences, SonarLint->Scanner Properties and add the properties:

sonar.exclusions=**/*.js
sonar.test.exclusions=**/*.js

More information about this: http://docs.sonarqube.org/display/SONAR/Narrowing+the+Focus

SonarLint will still be triggered but it will skip all files that are JS source files. You can tune the exclusions to only exclude a subset of the js files. Also note that since SonarLint Eclipse 1.1, derived resources are excluded from the analysis.

like image 172
Duarte Meneses Avatar answered Sep 22 '22 02:09

Duarte Meneses