Open alcaeus opened 6 years ago
if it's possible to properly check coding standards in docblocks
It's possible but it's difficult. We'll see :)
I like the idea, but this is Doctrine-specific. Although Doctrine Annotations are widespread enough so it should imho be fine here. My suggestion: Wait for Annotations 2.0, there will be proper grammar & grammar-based parser, maybe also AST. Should be fully backward compatible. :)
This sniff would compare to
SlevomatCodingStandard.Arrays.TrailingArrayCommaSniff
and require a trailing comma on each line of a multi-line annotation. The idea is to reduce the diff size when adding a new property or item in a list. Caveat: I'm not sure if it's possible to properly check coding standards in docblocks - my parser knowledge ends well before that.