scoverage / sbt-scoverage

sbt plugin for scoverage
Apache License 2.0
649 stars 157 forks source link

add tests for list of coverage exclude patterns and maybe fix documentation (Scala 3) #542

Closed visma-alexander-maslov closed 1 month ago

visma-alexander-maslov commented 3 months ago

The -coverage-exclude-files and -coverage-exclude-packages are MultiStringSettings https://github.com/scala/scala3/blob/2d0e37353defcec46206e9f0845c738286aabce5/compiler/src/dotty/tools/dotc/config/ScalaSettings.scala#L122-L123

The , is used as a separator, at least according to https://github.com/scala/scala3/blob/2d0e37353defcec46206e9f0845c738286aabce5/compiler/src/dotty/tools/dotc/config/Settings.scala#L239

README example uses ; https://github.com/scoverage/sbt-scoverage/blob/76a39fb1203cd417e298b97e59f744d29525bbc6/README.md?plain=1#L77-L89

Using ; with the 2.1.0 plugin and 3.4.2 Scala does not exclude specified values. Changing it to , seems to work. I have only tried it for coverageExcludedFiles, but I guess it works the same for both options.

Tests seems to lack this case.

ckipp01 commented 3 months ago

PRs are welcome.

jozic commented 3 months ago

seems I've missed this, but the fix should be as easy as replace ; with , for Scala 3. I can send a PR once I have some time or anyone else can contribute as well :)