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

Backport "fix: scoverage statement's line number should be 1-base" to LTS #19236

Merged
merged 4 commits into from
Dec 13, 2023

Conversation

Kordyjan
Copy link
Contributor

Backports #18932 to the LTS branch.

PR submitted by the release tooling.

tanishiking and others added 4 commits December 11, 2023 13:34
fix #18916

This PR makes scoverage statements' line number 1-base,
instead of 0-base, as @tarao described.

It would be ideal if we could find specifications of many of
coverage report fomats (such as Jacoco XML, cobertura.xml, lcov.txt...)
and confirm most of them expect the line numbers 1-base.

However, it seems there's no formal specification for them AFAIK.
Since we've been using 1-base so far in Scala2 and it hasn't been a problem,
so I guess it's OK to change to 1-base (and most of coverage report
format and visualizer expect 1-base maybe).

I believe it should be reporter / aggregator's responsibility to
adjust the line numbers if some coverage format expects 0-base.

Add doc comment to Statement @param line that it's 1-base

Update scoverage.check files

sbt> scala3-compiler-bootstrapped / Test / testCompilation --update-checkfiles

[Cherry-picked 86aaea9]
Base automatically changed from lts-18498 to release-3.3.2 December 13, 2023 16:31
@Kordyjan
Copy link
Contributor Author

No regressions detected in the community build up to lts-18932.

Reference

@Kordyjan Kordyjan merged commit 3f89c26 into release-3.3.2 Dec 13, 2023
19 checks passed
@Kordyjan Kordyjan deleted the lts-18932 branch December 13, 2023 16:31
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.

2 participants