SonarQube 5.2 + Javascript 2.8 sonar.exclusions not honoured

微笑、不失礼 提交于 2019-12-11 09:52:30

问题


Using SonarQube 5.2 with Javascript plugin 2.8. I can not seem to prevent generated Javascript files (created by com.samaxes.maven:minify-maven-plugin:minify) from being analyzed by SonarQube. I find no way to configure this property in the SonarQube administrative interface. I also try with $PROJECT/sonar-project.properties with only 1 line:

sonar.exclusions=**/all-script.js,**/all-script.min.js,**/all-style.css,**/all-style.min.css

Having these files being scanned is generating hundreds upon hundreds of warnings of Major severity. The modular version of these javascript/css files have only a couple of warnings. How can I avoid the analysis of these generated javascript and css files without changing their final location on the file system?


回答1:


I was never able to get the sonar-project.properties file method working, but I was able to to pass -Dsonar.exclusions=**/all-script.js,**/all-script.min.js,**/all-style.css,**/all-style.min.css via Jenkins properties to our Apache Maven invocation. That worked. :-)



来源:https://stackoverflow.com/questions/34079635/sonarqube-5-2-javascript-2-8-sonar-exclusions-not-honoured

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