问题
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