STAMP-project / pitmp-maven-plugin

Maven plugin to handle multi module projects for PiTest
GNU Lesser General Public License v3.0
46 stars 14 forks source link

-1 in codeline #46

Open martinch-kth opened 5 years ago

martinch-kth commented 5 years ago

Set the codeline to -1 of what is now.

Example: https://github.com/martinch-kth/commons-codec/blob/trunk/src/main/java/org/apache/commons/codec/language/DoubleMetaphone.java#L782

781 private boolean conditionC0(final String value, final int index) { 782 if (contains(value, index, 4, "CHIA")) {

So the links should go to the line of the method signature.

Characteristics

Description

Steps to reproduce

Other files and URLs

Relationships

Help on issue template

Preview to follow the link or open file .github/ISSUE_DOC.md

oscarlvp commented 5 years ago

This is related to the way PIT handles the mutation information internally and ow it is reported. During mutation, the actual location expands to all the lines in the method, that is, instead of the first line we actually tell PIT that all the lines in the method has been mutated. However, PIT reports only the first line involved in the mutation. I prefer to highlight all the lines inside the method instead of only the signature. It might be the case that the signature expands to several lines, so -1 will not work for all cases. We have been searching for a while now, how to improve the report without breaking the compatibility with PIT.