FILE: /home/anoopjohn/projects/drupal/drupal-8/core/authorize.php
----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
51 | ERROR | [x] Parameter comment indentation must be 3 spaces,
| | found 2 spaces
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | FunctionCommentSniff.patch.txt | 4.11 KB | alexpott |
| #9 | drupal-coder-ParamCommentIndentation-simple-fixes-2700661-9.patch | 40.61 KB | anoopjohn |
Comments
Comment #2
anoopjohn commentedPlease find the patch for the correction.
Comment #3
zuhair_akThis is the only coder issue in authorize.php. Tested patch and found working against latest 8.2.x-dev branch.
Comment #4
alexpottSee https://www.drupal.org/core/scope - this issue does not have the correct scope. We should be fixing this rule in all of core and enabling the rule in core/phpcs.xml.dist.
There does not seem to be an issue to enable Drupal.Commenting.FunctionComment.ParamCommentIndentation on #2571965: [meta] Fix PHP coding standards in core, stage 1 so let's re-scope this issue.
Comment #5
anoopjohn commentedThanks @alexpott for pointing that issue out. Will review and see how I can contribute towards this effort.
Comment #6
anoopjohn commentedI have gone through all issues related to the rule Drupal.Commenting.FunctionComment.ParamCommentIndentation in the Drupal.Commenting.FunctionComment sniff and have prepared two patches. The first patch is with fixes that just had minor spacing fixes and can be reviewed quite easily. Most of the issues were of this type. The second patch involved moving orphan comment paragraphs from after @params section to before it and similar changes and requires slightly more detailed review.
I have only made the fixes to the files in the core directory and sub folders but not for files outside it. Please confirm if that is the correct approach to take.
Comment #7
anoopjohn commentedComment #8
alexpott@anoopjohn nice work! And good call here on splitting up the simple from the complex. I think we should do the simple fixes in this issue and then open a followup to add the rule to phpcs.xml.dist and do the complex fixes.
So next steps here are
1. to upload the simple patch again - so it is the last patch on the issue - this makes the rtbc retest work as expected and tells people which patch to review
2. Create the followup and link it to this issue.
3. Get reviews of the "simple" patch.
Comment #9
anoopjohn commentedThanks for the feedback @alexpott. I am attaching the patch with the simple fixes here. I will create a new issue and attach the second patch there.
Comment #10
alexpottSo it's not possible to add
phpcs.xml.distonlyDrupal.Commenting.FunctionComment.ParamCommentIndentation- need to add all ofDrupal.Commenting.FunctionComment- which results in lots and lots of things to fix. What we can do is change the severity of all the other sub sniffs so we only report on this one. The txt file attached is a patch that does exactly that. After applying that and the two patches on this issue there are no phpcs errors.Therefore we can continue with the plan outlined in #8 and we can add the change to phpcs.xml.dist in the followup issue.
I've reviewed the patch in #9 and all the changes made are whitespace. This is good to go.
Comment #11
alexpottCommitted 87378ae and pushed to 8.1.x and 8.2.x. Thanks!
Comment #13
alexpottOpened #2707641: Ensure core compliance to Drupal.Commenting.FunctionComment.ParamCommentIndentation (part 2)