- 🇺🇸United States donpwinston
"Always add trailing commas, if possible"
I think rules like this are silly. The PSR guidelines are sufficient. Should be just focusing on just Drupal specific things.
- 🇬🇧United Kingdom catch
I think we need to resolve #10. I personally would not want trailing commas at the end of function declarations, unless maybe they're multi-line, which I think we have another issue for.
We can maybe say 'MUST use trailing commas where possible for multi-line declarations'.
Or 'MUST use trailing commas for arrays and annotations' and leave function declarations and calls for another issue.
- 🇳🇱Netherlands bbrala Netherlands
+1 , this makes merges a lot easier because of readability and less noise.
- 🇬🇧United Kingdom catch
Looking at the issue summary this only mentions arrays and annotations, so I think we can leave multi-line function declarations/calls undefined.
We probably need to add the same rules for attributes as annotations, but I guess we don't have anything to add to yet.
- 🇳🇿New Zealand quietone
There was no further discussion of this change in the latest coding standard meeting. @catch and @bbrala support the changed. I am adding tags per step 8 of the CS process on the project page.
- 🇳🇿New Zealand quietone
We didn't discuss changes to Coder here. That needs to be done.
- 🇬🇧United Kingdom catch
I think core might already have the coder rule for arrays enabled after #2572613: Fix 'Drupal.Array.Array.CommaLastItem' coding standard → - coder and core getting ahead of the docs.
However we should probably open a coder issue for annotations?
- 🇳🇿New Zealand quietone
Followup made, 📌 Ensure trailing commas in annotations Active
Updated the title to show the scope of this issue - Status changed to Fixed
over 1 year ago 4:24am 14 August 2023 - 🇳🇿New Zealand quietone
I have updated the coding standard pages and confirmed the change using the 'compare' option in the history.
Per step 10, I have removed the tag and set the issue to "Fixed".
Thanks everyone!
Automatically closed - issue fixed for 2 weeks with no activity.