SonarQube 4.3.2 Javascript exclude [duplicate]

只愿长相守 提交于 2019-12-22 11:34:11

问题


We are using SonarQube version 4.3.2 with our Java project. We want to exclude all javascript files which are currently being analyzed. We tried excluding by using *.js in exclusion list, but it did not work. Please help.


回答1:


In your sonar-project.properties, you have two ways to ignore files:

  • sonar.exclusions=the/full/path/*.xml will ignore all .xml files in path.
  • sonar.exclusions=**/*.xml will ignore all .xml files in the folder and sub-folders where you are.

Here are the different wildcards:

*    zero or more characters
**   zero or more directories
?    a single character

You can find more information on Sonar Documentation




回答2:


Following pattern will exclude all javascripts from Sonarcube analysis -

sonar.exclusions=**/*.js



来源:https://stackoverflow.com/questions/25112543/sonarqube-4-3-2-javascript-exclude

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