简体   繁体   中英

Sonar tests and binaries properties, what do they do?

In Sonar documentation there are two properties options, the sonar.tests and sonar.binaries .

# path to test source directories (optional)
sonar.tests=testDir1,testDir2

# path to project binaries (optional), for example directory of Java bytecode
sonar.binaries=binDir

Questions:

  1. If sonar.tests and sonar.binaries are added to my Ant target, how do they show up in Sonar? What would be different in Sonar if I did/did not set these properties?

  2. Should sonar.binaries contain both source binaries and test binaries, or only source?

  3. Can .jar files be given to both properties instead of path to actual .class files and/or .java files?

Answers:

  1. If you do not set those 2 properties, you won't have test results ("sonar.tests") nor violations detected by Findbugs or bytecode-based tools ("sonar.binaries").

  2. "sonar.binaries" should contain only compiled sources, not tests

  3. No. Only "sonar.libraries" can (and actually must) point to JAR files.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM