Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properly handle multiple exclude entries for Scala 3 #548

Conversation

jozic
Copy link
Contributor

@jozic jozic commented Aug 8, 2024

Closes #542

@jozic jozic marked this pull request as ready for review August 8, 2024 16:44
@jozic
Copy link
Contributor Author

jozic commented Aug 8, 2024

@ckipp01 @rolandtritsch please check this out, should be quick

@@ -4,7 +4,7 @@ scalaVersion := "3.4.2"

libraryDependencies += "org.scalameta" %% "munit" % "0.7.29" % Test

coverageExcludedFiles := ".*/two/GoodCoverage"
coverageExcludedFiles := ".*/two/GoodCoverage;.*/three/GoodCoverage"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do the forward slashes need to be escaped like this ... ???

coverageExcludedFiles := ".*\\/two\\/GoodCoverage;.*\\/three\\/.*"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, not sure about slashes. I believe it works as is on Linux which is proven by tests. But maybe you would want to add a windows environment for the checks and we can see if tests pass.

And thanks for checking the PR!

@rolandtritsch
Copy link
Member

@ckipp01 @rolandtritsch please check this out, should be quick

Hi @jozic. Sorry. Just seeing this now. Thanks for the fix. One quick question/comment. Otherwise it looks good.

@rolandtritsch
Copy link
Member

Hi @jozic. Was just testing this (more). Found one (small) problem, where the test file is missing some tests. Will merge the fix first. Will improve the test files in a seperate PR. Thanks for the fix.

@rolandtritsch rolandtritsch merged commit 162ef11 into scoverage:main Aug 21, 2024
3 checks passed
@jozic jozic deleted the properly-handle-multiple-exclude-entries-for-scala3 branch August 21, 2024 16:10
@rolandtritsch
Copy link
Member

rolandtritsch commented Aug 21, 2024

Hi @jozic. Just released v2.1.1 - https://github.com/scoverage/sbt-scoverage/releases/tag/v2.1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

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