-
Bug
-
Resolution: Not A Defect
-
Minor
-
None
This is my DSL block:
recordCoverage( failOnError: true, sourceCodeEncoding: 'UTF-8', sourceDirectories: [[path: "glob:$projectDir/*/src/**"]], tools: [[parser: 'JACOCO', pattern: "$projectDir/*/build/reports/kover/report.xml"]], sourceCodeRetention: 'MODIFIED' )
where projectDir resolves to a Gradle product component (multi-module project) of a monorepo workspace (let's call this "foo"). Now, when I execute a build and record the coverage it seems to totally ignore the source directory:
... COMPLEXITY_DENSITY: 654/1832 LOC: 1832 Successfully processed file 'path/to/build/reports/kover/report.xml' Resolving source code files... Searching for source code files in '/home/jenkins/workspace/..redacted_PR-80/src/main/java' -> finished resolving of absolute paths (found: 0, not found: 307) Obtaining action of reference build ...
I figured the actual path resolving happens within the prism plugin and that any prefix like glob: or regex: is not evaluated at all on the plugin's side, which puzzles me a lot.
Now, when I use the glob-less source parameter to just point at the subdirectory (i.e. sourceDirectories: [[path: projectDir]]), no sources are found either:
...
Searching for source code files in:
-> /home/jenkins/workspace/...redacted_PR-80/src/main/java
-> /home/jenkins/workspace/...redacted_PR-80/foo/
-> finished resolving of absolute paths (found: 0, not found: 307)
Obtaining action of reference build