Skip to main content
Post Reopened by Gaël J, talex, Seth Tisue
added 69 characters in body
Source Link
ppllaxxa
  • 35
  • 2
  • 2

I saw one problem during project upgrade.

Before upgrade setup:

  • Java - 1.8

  • Scala - 2.12

  • sbt - 1.5.0

  • sbt-jacoco - 3.1.0

Overall test coverage in SonarQube: ~72%

After upgrade:

  • Java - 17

  • Scala - 2.13

  • sbt - 1.10.11

  • sbt-jacoco - 3.4.0

Overall test coverage in SonarQube: ~62%

With upgrade of sbt-jacoco our overall test coverage decreased by ~10%.

After some investigation we found that sbt-jacoco 3.4.0 now counting branches of synthetic methods (e.g. copy$ methods for case classes).

I checked source code of sbt-jacoco and I could see there is appropriate filter (scala synthetic methods) implemented, but looks like it doesn't work, or maybe I should enable it somehow during launching jacoco command.

In addition it also counting plain getters starting from sbt-jacoco 3.4.0, but per jacoco it shouldn't.

UPD

@aled, @Gaël J, you are right, I should add some example. And the question is "how to exclude synthetic methods from SBT Jacoco report"

Here is before upgrade (should be launched with Java 1.8): https://github.com/ppllaxxa/sbt-jacoco-test

After upgrade (should be launched with Java 17): https://github.com/ppllaxxa/sbt-jacoco-test-upgrade

To generate jacoco report just execute in sbt shell: clean coverageOn jacoco coverageReport coverageOff

Report will be located here: sbt-jacoco-test\target\scala-2.12\jacoco\report\html Before upgrade

sbt-jacoco-test-upgrade\target\scala-2.13\jacoco\report\html After upgrade

I saw one problem during project upgrade.

Before upgrade setup:

  • Java - 1.8

  • Scala - 2.12

  • sbt - 1.5.0

  • sbt-jacoco - 3.1.0

Overall test coverage in SonarQube: ~72%

After upgrade:

  • Java - 17

  • Scala - 2.13

  • sbt - 1.10.11

  • sbt-jacoco - 3.4.0

Overall test coverage in SonarQube: ~62%

With upgrade of sbt-jacoco our overall test coverage decreased by ~10%.

After some investigation we found that sbt-jacoco 3.4.0 now counting branches of synthetic methods (e.g. copy$ methods for case classes).

I checked source code of sbt-jacoco and I could see there is appropriate filter (scala synthetic methods) implemented, but looks like it doesn't work, or maybe I should enable it somehow during launching jacoco command.

In addition it also counting plain getters starting from sbt-jacoco 3.4.0, but per jacoco it shouldn't.

UPD

@aled, @Gaël J, you are right, I should add some example. And the question is "how to exclude synthetic methods from SBT Jacoco report"

Here is before upgrade: https://github.com/ppllaxxa/sbt-jacoco-test

After upgrade: https://github.com/ppllaxxa/sbt-jacoco-test-upgrade

To generate jacoco report just execute in sbt shell: clean coverageOn jacoco coverageReport coverageOff

Report will be located here: sbt-jacoco-test\target\scala-2.12\jacoco\report\html Before upgrade

sbt-jacoco-test-upgrade\target\scala-2.13\jacoco\report\html After upgrade

I saw one problem during project upgrade.

Before upgrade setup:

  • Java - 1.8

  • Scala - 2.12

  • sbt - 1.5.0

  • sbt-jacoco - 3.1.0

Overall test coverage in SonarQube: ~72%

After upgrade:

  • Java - 17

  • Scala - 2.13

  • sbt - 1.10.11

  • sbt-jacoco - 3.4.0

Overall test coverage in SonarQube: ~62%

With upgrade of sbt-jacoco our overall test coverage decreased by ~10%.

After some investigation we found that sbt-jacoco 3.4.0 now counting branches of synthetic methods (e.g. copy$ methods for case classes).

I checked source code of sbt-jacoco and I could see there is appropriate filter (scala synthetic methods) implemented, but looks like it doesn't work, or maybe I should enable it somehow during launching jacoco command.

In addition it also counting plain getters starting from sbt-jacoco 3.4.0, but per jacoco it shouldn't.

UPD

@aled, @Gaël J, you are right, I should add some example. And the question is "how to exclude synthetic methods from SBT Jacoco report"

Here is before upgrade (should be launched with Java 1.8): https://github.com/ppllaxxa/sbt-jacoco-test

After upgrade (should be launched with Java 17): https://github.com/ppllaxxa/sbt-jacoco-test-upgrade

To generate jacoco report just execute in sbt shell: clean coverageOn jacoco coverageReport coverageOff

Report will be located here: sbt-jacoco-test\target\scala-2.12\jacoco\report\html Before upgrade

sbt-jacoco-test-upgrade\target\scala-2.13\jacoco\report\html After upgrade

added 159 characters in body
Source Link
ppllaxxa
  • 35
  • 2
  • 2

I saw one problem during project upgrade.

Before upgrade setup:

  • Java - 1.8

  • Scala - 2.12

  • sbt - 1.5.0

  • sbt-jacoco - 3.1.0

Overall test coverage in SonarQube: ~72%

After upgrade:

  • Java - 17

  • Scala - 2.13

  • sbt - 1.10.11

  • sbt-jacoco - 3.4.0

Overall test coverage in SonarQube: ~62%

With upgrade of sbt-jacoco our overall test coverage decreased by ~10%.

After some investigation we found that sbt-jacoco 3.4.0 now counting branches of synthetic methods (e.g. copy$ methods for case classes).

I checked source code of sbt-jacoco and I could see there is appropriate filter (scala synthetic methods) implemented, but looks like it doesn't work, or maybe I should enable it somehow during launching jacoco command.

In addition it also counting plain getters starting from sbt-jacoco 3.4.0, but per jacoco it shouldn't.

UPD

@aled, @Gaël J, you are right, I should add some example. And the question is "how to exclude synthetic methods from SBT Jacoco report"

Here is before upgrade: https://github.com/ppllaxxa/sbt-jacoco-test

After upgrade: https://github.com/ppllaxxa/sbt-jacoco-test-upgrade

To generate jacoco report just execute in sbt shell: clean coverageOn jacoco coverageReport coverageOff

Report will be located here: sbt-jacoco-test\target\scala-2.12\jacoco\report\html Before upgradeBefore upgrade

sbt-jacoco-test-upgrade\target\scala-2.13\jacoco\report\html After upgradeAfter upgrade

I saw one problem during project upgrade.

Before upgrade setup:

  • Java - 1.8

  • Scala - 2.12

  • sbt - 1.5.0

  • sbt-jacoco - 3.1.0

Overall test coverage in SonarQube: ~72%

After upgrade:

  • Java - 17

  • Scala - 2.13

  • sbt - 1.10.11

  • sbt-jacoco - 3.4.0

Overall test coverage in SonarQube: ~62%

With upgrade of sbt-jacoco our overall test coverage decreased by ~10%.

After some investigation we found that sbt-jacoco 3.4.0 now counting branches of synthetic methods (e.g. copy$ methods for case classes).

I checked source code of sbt-jacoco and I could see there is appropriate filter (scala synthetic methods) implemented, but looks like it doesn't work, or maybe I should enable it somehow during launching jacoco command.

In addition it also counting plain getters starting from sbt-jacoco 3.4.0, but per jacoco it shouldn't.

UPD

@aled, @Gaël J, you are right, I should add some example.

Here is before upgrade: https://github.com/ppllaxxa/sbt-jacoco-test

After upgrade: https://github.com/ppllaxxa/sbt-jacoco-test-upgrade

To generate jacoco report just execute in sbt shell: clean coverageOn jacoco coverageReport coverageOff

Report will be located here: sbt-jacoco-test\target\scala-2.12\jacoco\report\html Before upgrade

sbt-jacoco-test-upgrade\target\scala-2.13\jacoco\report\html After upgrade

I saw one problem during project upgrade.

Before upgrade setup:

  • Java - 1.8

  • Scala - 2.12

  • sbt - 1.5.0

  • sbt-jacoco - 3.1.0

Overall test coverage in SonarQube: ~72%

After upgrade:

  • Java - 17

  • Scala - 2.13

  • sbt - 1.10.11

  • sbt-jacoco - 3.4.0

Overall test coverage in SonarQube: ~62%

With upgrade of sbt-jacoco our overall test coverage decreased by ~10%.

After some investigation we found that sbt-jacoco 3.4.0 now counting branches of synthetic methods (e.g. copy$ methods for case classes).

I checked source code of sbt-jacoco and I could see there is appropriate filter (scala synthetic methods) implemented, but looks like it doesn't work, or maybe I should enable it somehow during launching jacoco command.

In addition it also counting plain getters starting from sbt-jacoco 3.4.0, but per jacoco it shouldn't.

UPD

@aled, @Gaël J, you are right, I should add some example. And the question is "how to exclude synthetic methods from SBT Jacoco report"

Here is before upgrade: https://github.com/ppllaxxa/sbt-jacoco-test

After upgrade: https://github.com/ppllaxxa/sbt-jacoco-test-upgrade

To generate jacoco report just execute in sbt shell: clean coverageOn jacoco coverageReport coverageOff

Report will be located here: sbt-jacoco-test\target\scala-2.12\jacoco\report\html Before upgrade

sbt-jacoco-test-upgrade\target\scala-2.13\jacoco\report\html After upgrade

added 597 characters in body
Source Link
ppllaxxa
  • 35
  • 2
  • 2

I saw one problem during project upgrade.

Before upgrade setup:

  • Java - 1.8

  • Scala - 2.12

  • sbt - 1.5.0

  • sbt-jacoco - 3.1.0

Overall test coverage in SonarQube: ~72%

After upgrade:

  • Java - 17

  • Scala - 2.13

  • sbt - 1.10.11

  • sbt-jacoco - 3.4.0

Overall test coverage in SonarQube: ~62%

With upgrade of sbt-jacoco our overall test coverage decreased by ~10%.

After some investigation we found that sbt-jacoco 3.4.0 now counting branches of synthetic methods (e.g. copy$ methods for case classes).

I checked source code of sbt-jacoco and I could see there is appropriate filter (scala synthetic methods) implemented, but looks like it doesn't work, or maybe I should enable it somehow during launching jacoco command.

In addition it also counting plain getters starting from sbt-jacoco 3.4.0, but per jacoco it shouldn't.

UPD

@aled, @Gaël J, you are right, I should add some example.

Here is before upgrade: https://github.com/ppllaxxa/sbt-jacoco-test

After upgrade: https://github.com/ppllaxxa/sbt-jacoco-test-upgrade

To generate jacoco report just execute in sbt shell: clean coverageOn jacoco coverageReport coverageOff

Report will be located here: sbt-jacoco-test\target\scala-2.12\jacoco\report\html Before upgrade

sbt-jacoco-test-upgrade\target\scala-2.13\jacoco\report\html After upgrade

I saw one problem during project upgrade.

Before upgrade setup:

  • Java - 1.8

  • Scala - 2.12

  • sbt - 1.5.0

  • sbt-jacoco - 3.1.0

Overall test coverage in SonarQube: ~72%

After upgrade:

  • Java - 17

  • Scala - 2.13

  • sbt - 1.10.11

  • sbt-jacoco - 3.4.0

Overall test coverage in SonarQube: ~62%

With upgrade of sbt-jacoco our overall test coverage decreased by ~10%.

After some investigation we found that sbt-jacoco 3.4.0 now counting branches of synthetic methods (e.g. copy$ methods for case classes).

I checked source code of sbt-jacoco and I could see there is appropriate filter (scala synthetic methods) implemented, but looks like it doesn't work, or maybe I should enable it somehow during launching jacoco command.

In addition it also counting plain getters starting from sbt-jacoco 3.4.0, but per jacoco it shouldn't.

I saw one problem during project upgrade.

Before upgrade setup:

  • Java - 1.8

  • Scala - 2.12

  • sbt - 1.5.0

  • sbt-jacoco - 3.1.0

Overall test coverage in SonarQube: ~72%

After upgrade:

  • Java - 17

  • Scala - 2.13

  • sbt - 1.10.11

  • sbt-jacoco - 3.4.0

Overall test coverage in SonarQube: ~62%

With upgrade of sbt-jacoco our overall test coverage decreased by ~10%.

After some investigation we found that sbt-jacoco 3.4.0 now counting branches of synthetic methods (e.g. copy$ methods for case classes).

I checked source code of sbt-jacoco and I could see there is appropriate filter (scala synthetic methods) implemented, but looks like it doesn't work, or maybe I should enable it somehow during launching jacoco command.

In addition it also counting plain getters starting from sbt-jacoco 3.4.0, but per jacoco it shouldn't.

UPD

@aled, @Gaël J, you are right, I should add some example.

Here is before upgrade: https://github.com/ppllaxxa/sbt-jacoco-test

After upgrade: https://github.com/ppllaxxa/sbt-jacoco-test-upgrade

To generate jacoco report just execute in sbt shell: clean coverageOn jacoco coverageReport coverageOff

Report will be located here: sbt-jacoco-test\target\scala-2.12\jacoco\report\html Before upgrade

sbt-jacoco-test-upgrade\target\scala-2.13\jacoco\report\html After upgrade

Post Closed as "Not suitable for this site" by Gastón Schabas, Toby Speight, gnat
Source Link
ppllaxxa
  • 35
  • 2
  • 2
Loading
created from staging ground
default