szpak / gradle-pitest-plugin

Gradle plugin for PIT Mutation Testing
http://gradle-pitest-plugin.solidsoft.info/
212 stars 57 forks source link

Wrong line number in XML report #225

Open malestim opened 3 years ago

malestim commented 3 years ago

Hey, for some projects I try to integrate the pitest plugin. The line number in the mutation report XML isn't matching with the code. For example in the report shows 209 but there are only 204 lines in code for that file. I tried to re run pitest several times and also clean build and recreate the project. There wasn't any code changes in the projects and I pulled the project from GitHub with any local copies or artifacts.

Gradle 5.0 JDK 1.8_202 Pitest 1.5.1

szpak commented 3 years ago

Thanks for the report. Does it match in the HTML report? Or both of them are wrong?

As it could be some bug in PIT itself, it would be useful to have a simple project that reproduce that problem to see why it is broken for that particular case.

malestim commented 3 years ago

It doesn't match in HTML and XML. Also the last few anchors in the HTML report are not matching to the code on top of the site.

Unfortunately i cannot create a test project due to time constraints at the moment.

szpak commented 2 years ago

Without a sample project it could be hard to pinpoint the problem - there could be some code construction causing that behavior. @malestim do you, by any chance, have some extra time to prepare a sample project to reproduce the problem (especially with the PIT version set to 1.7.0)?