Closed (fixed)
Project:
Drupal core
Version:
8.2.x-dev
Component:
base system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
18 Apr 2016 at 05:45 UTC
Updated:
22 May 2016 at 21:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
anoopjohn commentedAttaching the patch that fixes these sub-sniffs.
Updated comment in #2572645-7: [Meta] Fix 'Drupal.Commenting.FunctionComment' coding standard and also the doc https://docs.google.com/spreadsheets/d/1CtpbUdx8F0rGLuVcOOup--pWAhmQz-fL...
Comment #4
anoopjohn commentedThe patch is failing because the patch is to be applied after #2708185: Fix 'Drupal.Commenting.FunctionComment' coding standard - Issues related to spacing and styling. I hope this approach is fine.
There was however a spacing issue in the patch and that has been fixed and the patch re-attached here. However do note that the patch will still fail to apply until the aforementioned patch is applied.
Comment #6
anoopjohn commentedDo note that there are two errors related to ThrowsComment that coder will still report after applying this fix. This is because of a bug in coder module which falsely identifies a class name with '_' as a having multiple words (and therefore as a comment) and expects the comment to be in a new line. The bug has been reported in coder and a patch for the fix submitted as well - #2707989: The rule Drupal.Commenting.FunctionComment.ThrowsComment incorrectly triggers error for error classes with underscores
Comment #7
anoopjohn commentedI have verified that this patch works with the latest head.
Comment #8
klausiI think we also need to change the phpcs.xml.dist file to include the sniff now?
Comment #9
anoopjohn commentedSorry, missed that. I have updated the patch with the change in phpcs.xml.dist.
Comment #10
alexpottLooks good - I don't think it is in scope to fix the language used in each @throws.
Comment #11
alexpottCommitted 8789530 and pushed to 8.1.x and 8.2.x. Thanks!