Skip to content

Add more code coverage settings#6423

Merged
Naktibalda merged 1 commit into5.0from
code-coverage-configuration
Apr 8, 2022
Merged

Add more code coverage settings#6423
Naktibalda merged 1 commit into5.0from
code-coverage-configuration

Conversation

@Naktibalda
Copy link
Copy Markdown
Member

We had a few feature requests to add some code coverage setting and a few attempts to add these settings to Codeception.

I reviewed configuration options of PHPCodeCoverage library and added 3 missing settings:

  • strict_covers_annotation - marks test as risky if it has @covers annotation but executes some other code
  • ignore_deprecated_code - doesn't collect code coverage for code having @deprecated annotation
  • disable_code_coverage_ignore - ignores @codeCoverageIgnore, @codeCoverageIgnoreStart and @codeCoverageIgnoreEnd annotations

The only setting I left out is coverage_cache_directory, see https://github.com/sebastianbergmann/phpunit/blob/master/src/TextUI/TestRunner.php#L245-L277

Closes #6258
Replaces #5874
Replaces #5922

@Naktibalda
Copy link
Copy Markdown
Member Author

@DavertMik @TavoNiievez @SamMousa No comments?

@Naktibalda Naktibalda merged commit 9d3edf7 into 5.0 Apr 8, 2022
@Naktibalda Naktibalda deleted the code-coverage-configuration branch April 8, 2022 05:27
@Naktibalda Naktibalda mentioned this pull request Jul 28, 2022
2 tasks
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

Successfully merging this pull request may close these issues.

Expose PHPUnit's --disable-coverage-ignore option

2 participants