SonarQube 5.1.1,在哪里定义文件排除模式?

时间:2015-06-29 06:35:29

标签: sonarqube

我们希望从SonarQube分析中排除一些文件,我真的不知道我错过了什么。详情如下:

  • SonarQube 5.1.1
  • mvn sonar:用于分析的声纳
  • 现在可以在ui中看到要排除的文件,其路径如下:“src / main / webapp / resources / css / custom-theme / jquery-ui-1.8.23.custom.css”

我尝试通过SonarQube UI排除该文件: - >项目仪表板 - >设置 - >常规设置 - >排除 - >文件 - >源文件排除

排除使用的模式: - src / main / webapp / resources / css / custom-theme / jquery-ui-1.8.23.custom.css - /src/main/webapp/resources/css/custom-theme/jquery-ui-1.8.23.custom.css - 我们还尝试了** / resources / css / custom-theme / .css和其他东西

但仍然会对文件进行分析。分析的输出显示排除模式用于某些模块,但忽略了其他模块:

不排除:

[INFO] [08:05:22.015] -------------  Scan LMSTEST-UI-APPLICATION
[INFO] [08:05:22.015] Load module settings
[INFO] [08:05:22.037] Initializer FindbugsMavenInitializer
[INFO] [08:05:22.037] Initializer FindbugsMavenInitializer (done) | time=0ms
[INFO] [08:05:22.037] Base dir: /opt/ccde/jenkins_home/jobs/Build_LMSTEST_trunk/workspace/lmstest-ui/tstdatagenui-application
[INFO] [08:05:22.037] Working dir: /opt/ccde/jenkins_home/jobs/Build_LMSTEST_trunk/workspace/lmstest-ui/tstdatagenui-application/target/sonar
[INFO] [08:05:22.037] Source paths: src/main/webapp, pom.xml, src/main/java
[INFO] [08:05:22.037] Binary dirs: target/classes
[INFO] [08:05:22.037] Source encoding: windows-1252, default locale: de_DE
[INFO] [08:05:22.037] Index files
[INFO] [08:05:22.037] Excluded sources: 
[INFO] [08:05:22.037]   src/main/resources/**/*
[INFO] [08:05:22.050] 47 files indexed
[INFO] [08:05:22.050] 0 files ignored because of inclusion/exclusion patterns

排除:

[INFO] [08:05:21.679] -------------  Scan LMSTEST-BACKEND-EAR
[INFO] [08:05:21.679] Load module settings
[INFO] [08:05:21.700] Initializer FindbugsMavenInitializer
[INFO] [08:05:21.700] Initializer FindbugsMavenInitializer (done) | time=0ms
[INFO] [08:05:21.700] Base dir: /opt/ccde/jenkins_home/jobs/Build_LMSTEST_trunk/workspace/lmstest-backend/lmstest-backend-ear
[INFO] [08:05:21.700] Working dir: /opt/ccde/jenkins_home/jobs/Build_LMSTEST_trunk/workspace/lmstest-backend/lmstest-backend-ear/target/sonar
[INFO] [08:05:21.700] Source paths: pom.xml
[INFO] [08:05:21.700] Source encoding: UTF-8, default locale: de_DE
[INFO] [08:05:21.701] Index files
[INFO] [08:05:21.701] Excluded sources: 
[INFO] [08:05:21.701]   src/main/webapp/resources/css/custom-theme/jquery-ui-1.8.23.custom.css
[INFO] [08:05:21.701]   **/src/main/webapp/resources/css/custom-theme/jquery-ui-1.8.23.custom.css
[INFO] [08:05:21.701]   LMSTEST-UI-APPLICATION/src/main/webapp/resources/css/custom-theme/jquery-ui-1.8.23.custom.csssrc/main/webapp/resources/css/custom-theme/jquery-ui-1.8.23.custom.css
[INFO] [08:05:21.701]   **/LMSTEST-UI-APPLICATION/src/main/webapp/resources/css/custom-theme/jquery-ui-1.8.23.custom.csssrc/main/webapp/resources/css/custom-theme/jquery-ui-1.8.23.custom.css
[INFO] [08:05:21.702] 1 files indexed
[INFO] [08:05:21.702] 0 files ignored because of inclusion/exclusion patterns

总结我的问题: 有没有人知道为什么排除模式用于一个模块的相同分析而不是另一个模块。我们没有配置任何特殊的东西,它只是mvn声纳:声纳。 配置是在项目级别完成的 - 而不是在组件级别上完成。

提前感谢您的想法。

1 个答案:

答案 0 :(得分:2)

您似乎在某种程度上覆盖了模块级别的排除设置。参见

IWebElement logIn = new WebDriverWait(Driver, TimeSpan.FromSeconds(5)).Until(ExpectedConditions.ElementExists(By.CssSelector("input[class='btn btn-default']"));

UI中项目级别定义的设置被模块级别定义的设置覆盖,然后是项目本地属性(即pom.xml中定义的属性),然后是命令行。