You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe there is a severe design problem in the coverage sensors. It is observable if
a) multi-module project is analyzed plus
b) coverage report (e.g. the cobertura one) contains relative paths (see below, <source> is .)
If path is relative, SensorContext::fileSystem().baseDir().getAbsolutePath() is used as a base directory while parsing. After report is parsed the corresponding CoverageMeasures structure is cached. For the next sub-project the base directory should be actually recalculated, but it isn't.
I believe the cache can be used only if all paths are absolute. This design idea applicable to all sensors. If we don't check/force this fact, it's not safe to cache any reports (and we had a similar discussion in #1423).
The correct solution in my opinion should be
a. Terminate if coverage report of a if multi-module project contains relative paths and/or
b. Provide a property in order disable the cache
I know, that the coverage output can be customized, but the current implementation is a pitfall and must be fixed or at least documented IMHO.
Hi All
I believe there is a severe design problem in the coverage sensors. It is observable if
a) multi-module project is analyzed plus
b) coverage report (e.g. the cobertura one) contains relative paths (see below,
<source>
is.
)If path is relative,
SensorContext::fileSystem().baseDir().getAbsolutePath()
is used as a base directory while parsing. After report is parsed the correspondingCoverageMeasures
structure is cached. For the next sub-project the base directory should be actually recalculated, but it isn't.I believe the cache can be used only if all paths are absolute. This design idea applicable to all sensors. If we don't check/force this fact, it's not safe to cache any reports (and we had a similar discussion in #1423).
The correct solution in my opinion should be
a. Terminate if coverage report of a if multi-module project contains relative paths and/or
b. Provide a property in order disable the cache
I know, that the coverage output can be customized, but the current implementation is a pitfall and must be fixed or at least documented IMHO.
Best regards,
The text was updated successfully, but these errors were encountered: