Exclude JS files from SonarLint

倖福魔咒の 提交于 2019-12-01 05:20:16

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.

If someone bumps in here looking for steps for Visual Studio 2015, here is how its done in Visual Studio:

  1. Go to Tools>Options>SonarLint For Visual Studio
  2. Click Deactivate

And that's it, now js files won't be analyzed

Note: This does not exclude, but deactivate Js support. If you want to specify exclusion rules,then mention the same in SonarQube project which is bound in Visual Studio. (In connected mode, sonarlint uses configuration from SonarQube)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!