Closed Suchomel closed 4 months ago
Can you share a (minimal) coverage file and the filefilters and sourcedirs you are using? This would make it easier for me to reproduce your scenario.
filefilters
+GradleConfigurations.kt;+GradleExtensions.kt;+ProjectExtensions.kt;+AndroidApplicationPlugin.kt;+AndroidLibraryPlugin.kt;+MultiplatformLibraryPlugin.kt;+IsFeatureEnabledUseCase.kt;
sourcedirs
/Users/administrator/myagent/_work/2/s/gradle-config/src/main/kotlin/;/Users/administrator/myagent/_work/2/s/gradle-config/src/main/kotlin/;/Users/administrator/myagent/_work/2/s/gradle-config/src/main/kotlin/;/Users/administrator/myagent/_work/2/s/gradle-config/src/main/kotlin/;/Users/administrator/myagent/_work/2/s/gradle-config/src/main/kotlin/;/Users/administrator/myagent/_work/2/s/gradle-config/src/main/kotlin/;/Users/administrator/myagent/_work/2/s/multiplatform/library/feature-flag/src/commonMain/kotlin/;
If you prefix your filefilters with a *
it should work.
In your example this would result in the following filefilters:
+*GradleConfigurations.kt;+*GradleExtensions.kt;+*ProjectExtensions.kt;+*AndroidApplicationPlugin.kt;+*AndroidLibraryPlugin.kt;+*MultiplatformLibraryPlugin.kt;+*IsFeatureEnabledUseCase.kt;
Does this work for you?
It's working. I don't expect that the "file" changed on add source path :)
Thank you so much.
Great that it works for you. Before the XML file gets processed, the files links are searched on disk and the path in the XML in modified. Therefore the path changes in the process.
I use
filefilters
andsourcedirs
in same time, report is generated but all files are filtered out. When I use onlyfilefilters
, in summary is correctly filtered and on the detail is not visible covered lines. And when I use onlysourcedirs
the covered files are visible in the detail but of course files on summary are not filtered.I use it for filter PR changed files in code coverage.
Yaml Pipeline: