-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Feature suggestion: AbstractDocblockSniff #2222
Comments
@gsherwood Just checking: had a chance to think about this yet ? |
I like the concept, but I haven't had time to take a look at the details or think about how it might work. It's probably going to take me a while to get to. |
@gsherwood If you're open to it, I'd be happy to have a first go at this and adjust the existing comment sniffs (where relevant) to use the abstract. That should help figure out any kinks in my proposal above and if I'd run into situations which need discussion I could post those here ? |
Go for it :) |
Question: should the abstract be allowed to throw (generic) errors or should all error throwing be done in the concrete classes ? |
FYI: #2189 (comment)
|
Closing as replaced by PHPCSStandards/PHPCSUtils#517 |
Currently, the PEAR and the Squiz standard both contain a number of docblock related sniffs which are not configurable and are opinionated on what tags should be present in the various docblocks.
Additionally, the various sniffs contain duplicate code.
External standards can, of course, create their own sniffs for these type of checks, however, that would involve yet more code duplication.
@gsherwood Would there be interest in an
AbstractDocblockSniff
?I imagine that sniff could roughly look like:
This would allow some simplification of the code used in the various current PHPCS sniffs dealing with docblocks and allow for far greater flexibility for external standards which want to check docblocks against their own rules for required/multiple etc.
The text was updated successfully, but these errors were encountered: