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

Empty diff shown #1524

Closed
mimmi20 opened this issue Jun 22, 2021 · 1 comment · Fixed by #1540
Closed

Empty diff shown #1524

mimmi20 opened this issue Jun 22, 2021 · 1 comment · Fixed by #1540
Labels
Milestone

Comments

@mimmi20
Copy link

mimmi20 commented Jun 22, 2021

Question Answer
Infection version 0.23.0
Test Framework version PHPUnit 9.5.5
PHP version 7.4
Platform Ubuntu 20.04 (Github Action)
Github Repo mimmi20/mezzio-navigation-laminasviewrenderer-bootstrap@9fe605b

During a Build in a Github Action an empty diff was shown in the console output and in the Github Action.

image
image

The line of code was

$html .= $this->getIndent() . $this->getIndent() . '<ul class="breadcrumb">' . PHP_EOL;

With the Parameter "-s" , I could see on the console output that the "concat" Mutator was used. I asume that the Mutator tried to swap the both "$this->getIndent()" pieces.

It would be helpful, if the Github-Log-Output would include the used Mutator, when the Option "-s" is set.

maks-rafalko added a commit that referenced this issue Jul 20, 2021
* It will give more information about what Mutator is used and will be in line with other loggers
* It will make it clear to understand why the diff can be empty, like in #1524

Fixes #1524
@maks-rafalko maks-rafalko added this to the 0.24.0 milestone Jul 20, 2021
@maks-rafalko
Copy link
Member

maks-rafalko commented Jul 20, 2021

Thanks for creating this bug report and sorry for the late response.

Interesting case with the empty diff, by the way ;)

Yes, this is exactly because identical expressions are swapped, here is a playground example (see the first escaped mutant - diff is empty as well https://infection-php.dev/r/p2n1)

Mutator name for GitHub Annotations logger will be added in #1540

For the future, feel free to make a PR, help is much appreciated!

maks-rafalko added a commit that referenced this issue Jul 21, 2021
* It will give more information about what Mutator is used and will be in line with other loggers
* It will make it clear to understand why the diff can be empty, like in #1524

Fixes #1524
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants