我的项目的层次结构如下:
test-my-project>src>com.adapter
>com.adapter.schema
>test
我想在运行声纳时排除com.adapter.schema包。
我的sonar.properties是:
sonar.properties
/#required metadata
sonar.projectKey=test:prj
sonar.projectName=test-my-project
sonar.projectVersion=1.0
/# path to source directories (required)
sonar.sources=src
/# path to project binaries (optional), for example directory of Java bytecode
/# when you build the project, where the .class files are gone
sonar.binaries=build/classes
/# The value of the property must be the key of the language.
sonar.language=java
答案 0 :(得分:12)
您必须使用文档中描述的“sonar.exclusions”属性:http://docs.sonarqube.org/display/SONAR/Narrowing+the+Focus#NarrowingtheFocus-IgnoreFiles