-
Notifications
You must be signed in to change notification settings - Fork 108
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
Improve code coverage through annotations #1789
Comments
See #1815 |
Work underway for Optimization Detective in #1817. |
See #1817 (comment). We could avoid adding coverage-exclusion comments if we ensure that no plugins define any functions in their |
Work underway for Dominant Color Images in #1837 |
Work underway for Speculation-Rules Plugin for coverage improvements. #1845 |
Work underway for Web-Worker-Offloading plugin |
The current code coverage metrics are as follows :
and can be improved by addressing the following issues:
Ignore Coverage for Non-Critical Code Blocks:
Certain ubiquitous code blocks, such as:
These blocks can be excluded from code coverage by adding
// @codeCoverageIgnoreStart
and// @codeCoverageIgnoreEnd
annotations.Exclude Plugin Bootstrap Files from Coverage:
uninstall.php
as indirectly tested and decide whether similar exclusions are needed for files likehooks.php
.Add Missing
@covers
Annotations:@covers
annotations to map them to the code they validate. For instance:\Test_OD_URL_Metric::test_constructor
is missing a@covers ::get_uuid
annotation.Add Missing Tests:
These changes aim to focus coverage metrics on critical functionality and ensure more accurate and meaningful reports, improving code quality and maintainability.
cc : @westonruter
The text was updated successfully, but these errors were encountered: