-
Notifications
You must be signed in to change notification settings - Fork 1
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
"Parameter comment must end with a full stop" #3
Comments
Seems like you want to rework Backdrop\Sniffs\Commenting? Sure, give it a stab. (FTR: the rule has been forked from https://github.com/pfrenssen/coder/blob/8.3.x/coder_sniffer/Drupal/Sniffs/Commenting/FunctionCommentSniff.php, but we can adapt it to our needs) |
There is another comment scenario that it might be worth considering. |
Yes, I agree with adding
|
This might be what we should be using:
Wrap the code example in Update: And sure enough, core has lots of examples of that. So we should be using that. |
I think the issue is that PHP_CodeSniffer expects a comment to always contains sentences, but a comment could also contain a list of items, code, or a phrase. In none of those cases, a period is necessary. |
This is reported also from the rulesets used for Drupal; I saw many PHP_CodeSniffer reports for contributed modules that included errors about a missing period at the end of a comment. Can at least the error be changed to a warning? |
phpcs
displayed the error "Parameter comment must end with a full stop" on line 717 of the following code:I don't think this is correct and it's not taking lists into account. Also, I don't see many references to full-stops/periods in the documentation standards, other than the first, summary line of a docblock. So is this actually a thing?
In any case, I don't think adding a full-stop at line 717 solves anything. So something else needs to change here...
The text was updated successfully, but these errors were encountered: