Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove CodeCoverageAnnotationIgnorer (#1517)
Since we have a very explicit annotation `@infection-ignore-all` (added in #1468) that, again, very explicit on the purpose, and works not only for methods, but for most kinds of statements, let's remove `@codeCoverageIgnore` ignorer, that not only implicit (you may only want to ignore a piece of code temporarily, and only ignore) but also messes up the metrics (hides otherwise-uncovered mutations).
- Loading branch information
Showing
6 changed files
with
29 additions
and
240 deletions.
There are no files selected for viewing
59 changes: 0 additions & 59 deletions
59
src/PhpParser/Visitor/IgnoreNode/PhpUnitCodeCoverageAnnotationIgnorer.php
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
|
||
namespace Ignore_All_Mutations; | ||
|
||
/** @infection-ignore-all */ | ||
class DoNotMutateClass | ||
{ | ||
public function divide(int $a, int $b): float | ||
{ | ||
return $a / $b; | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
tests/e2e/Ignore_All_Mutations/tests/DoNotMutateClassTest.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
namespace Ignore_All_Mutations\Test; | ||
|
||
use Ignore_All_Mutations\DoNotMutateClass; | ||
use PHPUnit\Framework\TestCase; | ||
|
||
class DoNotMutateClassTest extends TestCase | ||
{ | ||
public function test_divide() | ||
{ | ||
$sourceClass = new DoNotMutateClass(); | ||
$this->assertGreaterThan(0.0, $sourceClass->divide(2, 2)); | ||
} | ||
|
||
} |
161 changes: 0 additions & 161 deletions
161
tests/phpunit/PhpParser/Visitor/IgnoreNode/PhpUnitCodeCoverageAnnotationIgnorerTest.php
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters