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

-1 in codeline #46

Open
martinch-kth opened this issue May 9, 2019 · 1 comment
Open

-1 in codeline #46

martinch-kth opened this issue May 9, 2019 · 1 comment

Comments

@martinch-kth
Copy link

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

  • Issue Type: [bug, feature, test report]
  • Reproducibility: [always, sometimes, random]
  • Severity: [feature, minor, major, crash, block]
  • Tool/Service/Component: [name, version]
  • Execution Environment: [platform, OS, etc]
  • Reporter: [name, mail]

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
Copy link
Member

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.

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

No branches or pull requests

2 participants