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
Please understand that
ISSUES WITHOUT FOLLOWING INFORMATION WILL BE CLOSED WITHOUT COMMENTS!
Thank you for filing a useful bug report!
Steps to reproduce
JaCoCo version: 0.8.8
Operating system: Ubuntu 22.0
Tool integration: Maven
Complete executable reproducer: GitHub
Steps: After analyzing the code with SonarCloud, it reported the following issues. Upon checking with the Sonar community, they indicated that the issue stems from Jacoco report generation.
Could you please assist us with resolving this matter?
Expected behaviour
Issues should not be reported in the lines which doesn't exist.
Actual behaviour
Issues are reported in the lines which doesn't exist.
===========
Sonar is reporting issues on line numbers that are out of range in the file, and it’s generating the following errors.
For example, below mentioned file has 140 lines, but sonar reporting issues at 142 line.
r4e-report/src/main/java/com/reputation/report/utils/ReportUtils.java
[ERROR] Cannot import coverage information for file 'r4e-report/src/main/java/com/reputation/report/utils/ReportUtils.java', coverage data is invalid. Error: {}
java.lang.IllegalStateException: Line 142 is out of range in the file r4e-report/src/main/java/com/reputation/report/utils/ReportUtils.java (lines: 141)
at org.sonar.api.utils.Preconditions.checkState(Preconditions.java:61)
at org.sonar.api.batch.sensor.coverage.internal.DefaultCoverage.validateLine(DefaultCoverage.java:67)
at org.sonar.api.batch.sensor.coverage.internal.DefaultCoverage.lineHits(DefaultCoverage.java:55)
at org.sonar.plugins.jacoco.ReportImporter.importCoverage(ReportImporter.java:45)
at org.sonar.plugins.jacoco.JacocoSensor.importReport(JacocoSensor.java:81
==========
The text was updated successfully, but these errors were encountered:
There can be many reasons. Somehow the class file does not match the source file. To investigate please provide the file ReportUtils.java and the corresponding class files.
THIS IS A BUG TRACKER ONLY. FOR QUESTIONS PLEASE CHECK FAQ OR USE FORUM:
http://www.jacoco.org/jacoco/trunk/doc/faq.html
https://groups.google.com/forum/?fromgroups=#!forum/jacoco
Please understand that
ISSUES WITHOUT FOLLOWING INFORMATION WILL BE CLOSED WITHOUT COMMENTS!
Thank you for filing a useful bug report!
Steps to reproduce
Could you please assist us with resolving this matter?
Expected behaviour
Issues should not be reported in the lines which doesn't exist.
Actual behaviour
Issues are reported in the lines which doesn't exist.
===========
Sonar is reporting issues on line numbers that are out of range in the file, and it’s generating the following errors.
For example, below mentioned file has 140 lines, but sonar reporting issues at 142 line.
r4e-report/src/main/java/com/reputation/report/utils/ReportUtils.java
[ERROR] Cannot import coverage information for file 'r4e-report/src/main/java/com/reputation/report/utils/ReportUtils.java', coverage data is invalid. Error: {}
java.lang.IllegalStateException: Line 142 is out of range in the file r4e-report/src/main/java/com/reputation/report/utils/ReportUtils.java (lines: 141)
at org.sonar.api.utils.Preconditions.checkState(Preconditions.java:61)
at org.sonar.api.batch.sensor.coverage.internal.DefaultCoverage.validateLine(DefaultCoverage.java:67)
at org.sonar.api.batch.sensor.coverage.internal.DefaultCoverage.lineHits(DefaultCoverage.java:55)
at org.sonar.plugins.jacoco.ReportImporter.importCoverage(ReportImporter.java:45)
at org.sonar.plugins.jacoco.JacocoSensor.importReport(JacocoSensor.java:81
==========
The text was updated successfully, but these errors were encountered: