Skip to content
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

DocBlock comment enforcement #2

Open
ofbeaton opened this issue Jul 27, 2015 · 0 comments
Open

DocBlock comment enforcement #2

ofbeaton opened this issue Jul 27, 2015 · 0 comments

Comments

@ofbeaton
Copy link
Owner

Make a ruling on how a DocBlock comment should look. Implement a Sniff to enforce it.

Here's a good start:

/**
 * @file
 * @since 2015-07-27
 */

First of all, DocBlock comments can be incredibly redundant. The @since here will match the @since in a class comment.

For this reason, one thing to consider would be to require the absence of a docBlock for class, interface and trait files. Only in mixed or runner script files should it be required, and then a short description should be required as well.

A sensus of popular documentator software should be made to figure out if @file is required or not, and to see how much worth a docBlock has.

Some issues with the current Generic.Commenting.DocComment:

  • Generic.Commenting.DocComment.NonParamGroup should have a fix to simply add a blank line
  • Generic.Commenting.DocComment.MissingShort should we disallow the absence of short descriptions?
@ofbeaton ofbeaton changed the title DocBlock comment DocBlock comment enforcement Jul 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant