Open Cosby86 opened 6 years ago
hi @Cosby86 Could you test with this configuration ?
sonar.sources=./
sonar.tests=./
sonar.test.inclusions=**/**_test.go
sonar.sources.inclusions=**/**.go
Thank you for the answer. Not _test files are not considered but I have in the list packages where _test.go file are not presents. In the previous version of the plugin only the coverage of those packages where _test.go file is present were listed.
Yes we have changed the coverage computation. See #56, #60 and #61. If there is not have _test.go in package the sources files of package are covered with 0%.
It sound good. Is there any way to exclude a package from coverage mesurement?
I will ask sonarqube to know how use the sonar.coverage.exclusions property (https://docs.sonarqube.org/display/SONAR/Analysis+Parameters)
@danielleberre we can use the method doesNotMatchPathPatterns of FilePredicates for exclude the patterns of property sonar.coverage.exclusions: http://javadocs.sonarsource.org/6.2.1/apidocs/org/sonar/api/batch/fs/FilePredicates.html#doesNotMatchPathPatterns-java.lang.String:A-
Hello @Cosby86
Do you have the problem with the latest version ? If not, could you close this issue ?
Hello all i just updated my sonar plugin to the latest RC (rc12). Despite I added those 2 lines into config file
sonar.test.inclusions=/_test.go sonar.sources.inclusions=/.go
In my coverage file list now are shown _test,go files too