-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Commenting/CodeCoverageIgnoreDeprecated: check OO docblocks too
As things were, the `Yoast.Commenting.CodeCoverageIgnoreDeprecated` sniff only checked function docblocks to find a `@deprecated` tag and verify this was accompanied by a `@codeCoverageIgnore` tag. However, if a complete class (or other OO structure) is deprecated, we can also safely ignore it for code coverage checking. This updates the sniff to also check the docblocks of OO structures for `@deprecated` tags and verifies that, if those are found, they are accompanied by a `@codeCoverageIgnore` tag. Two exceptions are made: * The rule does not apply to interfaces as those can't contain code, so code coverage is not relevant. * The rule does not apply to anonymous classes. Those are treated the same as closures/arrow functions: those are normally nested within another construct and code coverage should be based on the wrapping construct. Includes tests.
- Loading branch information
Showing
5 changed files
with
217 additions
and
12 deletions.
There are no files selected for viewing
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
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
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