Hello all, it’s time for the fortnightly coding standards meeting.
This meeting:
➤ Is for anyone interested in the Drupal coding standards.
➤ Is held on the #coding standards channel in Drupal Slack (see www.drupal.org/slack for information).
➤ Usually happens fortnightly. Alternating between Tuesday 2100 UTC and Wednesday 0900 UTC.
➤ The meeting open for 24 hours to allow for all time zones.
➤ Discussion is done in threads, which you can follow to be notified of new replies even if you don’t comment in the thread. You may also join the meeting later and participate asynchronously.
➤ Has a public agenda anyone by adding a comment to the meeting issue.
➤ A transcript will be made using drupal-meeting-parser and posted to the agenda issue. For anonymous comments, start with a :bust_in_silhouette: emoji. To take a comment or thread off the record, start with a :no_entry_sign: emoji.
➤ The transcript will include comments made during the 24 hours of the meeting. However, comments made after the 24 hours may not be in transcript.
Current ping list: @catch, @longwave, @quietone
@dww, @borisson_ @longwave @Björn Brala, @Aaron McHale, @Alex Skrypnyk, @Urvashi, @Kingdutch
0️⃣ Who is here today? Comment in the thread to introduce yourself. We’ll keep the meeting open for 24 hours to allow for all time zones.
| longwave |
hello :wave: |
| Alex Skrypnyk |
hello :wave: |
| catch |
:wave: |
| Tyler Staples (nexusnovaz) |
Hey! First time catching this meeting! Not sure ill be able to contribute much, but may have some questions! |
| nicxvan |
Hi |
| borisson_ |
:wave: |
| bbrala |
very late to the party |
1️⃣ What topics do you want to discuss? Post in this thread and we’ll open threads for them as appropriate.
2️⃣ Action items
2️⃣.1️⃣ Approve minutes for previous meeting(s)
2️⃣.2️⃣ Issues to go to core committer meeting
2️⃣.3️⃣ TBD
3️⃣ Fixed since last meeting
4️⃣ RTBC issues
| quietone |
This has been committed, coder issue made, and the coder issue is fixed as well. |
| quietone |
So, this just needs checking that everything is complete, that nothing was missed. |
| Alex Skrypnyk |
Meeting notes recorded :white_check_mark:Change record created :white_check_mark:Coder issue created :white_check_mark:All done here. |
| Alex Skrypnyk |
There is a question from the Coder maintainer whether we want this to be ported back to Coder #3557537: Enforce traits should always have the suffix "Trait"#comment-16357214 (edited) |
| bbrala |
Checked proposal, seems fine. Think we mostly need to add a follow up to get the sniff into core. |
| quietone |
@mherchel has approved the content, so this can move along. |
| quietone |
The MR is failing cSpell. Can someone look into that? |
| quietone |
It looks like a followup is needed for comment #25. |
| quietone |
This has all the sign-offs but was set back to needs work in comment 190. |
| quietone |
From my reading and catch's the changes are wording changes, not changing the decision. Therefore, new issues should be opened for the points raised. |
| quietone |
Any objection to doing the above? |
| borisson_ |
No objections, seems good to me |
| quietone |
This is at the step needing a change record. |
| quietone |
How will this work when a reviewer thinks a test method requires documentation? |
| quietone |
And should the test documentation be a requirement for commit, or move to a followup? |
| quietone |
My points aside, who wants to make the change record? |
| quietone |
Any opinions on this one? |
| quietone |
For myself, I am fine with having them even if people use them incorrectly. |
| longwave |
I don't know how well understood they are by non native speakers, and "for example" / "that is" are not much longer |
| quietone |
Good point about non-native speakers. |
| Tyler Staples (nexusnovaz) |
I've got to agree, having examples is a must but it also needs to be accessible. I know some native English speakers who don't know the difference between i.e. and e.g.
How would one work on this issue? Would it be under the coding standards project or core (or some other project entirely)? |
| quietone |
@Tyler Staples (nexusnovaz), Before changing any code we need to have an agreement here. You can help with that by commenting on the issue. Next we follow the coding standards process. This issue is older and does not have the new issue template which includes the steps that the coding standard committee follows. You can read the steps are on the project page, https://www.drupal.org/project/coding_standards . In the meantime, I will update the issue with the new template. |
| quietone |
The coding standards don't have anything about what words or abbreviations can be in comments. Maybe this should be in the content style guide? https://www.drupal.org/drupalorg/style-guide/content#upgradeupdate |
| quietone |
Although, I have yet to figure out how to suggest a change to the style guide. |
| borisson_ |
I keep forgetting which is which, but usually it's very easy to get from the context, so for me this is not really needed |
| nicxvan |
Thanks, initially I was against the issue, but two separate hooks have gotten into core with the incorrect format already |
| quietone |
There must be something in the current standards about the naming of hooks? |
| nicxvan |
Well i only know of one hook that actually starts with hook (edited) |
| nicxvan |
hook_hook_info |
| nicxvan |
But people i think are making the mistake |
| quietone |
But, yes, an issue in core to add the rule to phpcs.xml |
| quietone |
I've yet to find anything about naming of hooks in https://project.pages.drupalcode.org/coding_standards/ :disappointed: |
| nicxvan |
AFAIK there is no guideline |
| quietone |
Unless I am mistaken, an item could be added to the 'naming conventions'. https://project.pages.drupalcode.org/coding_standards/php/coding/#naming... |
| nicxvan |
Where is that code base? |
| nicxvan |
I think i think we're safe to make that recommendation since hook_hook_info is deprecated |
| nicxvan |
And cs rule is appropriate so custom code can do what they want |
| quietone |
https://www.drupal.org/project/coding_standards |
| nicxvan |
Thank you, I'll create two issues |
| nicxvan |
One too implement the rule in core and one to update those guidelines |
| nicxvan |
here is core: do core sniffs get tests? there are tests in coding standards |
| nicxvan |
https://www.drupal.org/project/drupal/issues/3559960 |
| nicxvan |
coding standards, I didn't finish filling it out yet:#3559961: Add guideline that hooks should not begin with the word hook_ |
| quietone |
Implementing a sniff in core does not get a test. However, I test manually to make sure it works as expected. |
| nicxvan |
I added it here: https://git.drupalcode.org/project/drupal/-/merge_requests/13956/diffs |
| nicxvan |
I tried testing it locally but I get this error:
ERROR: Referenced sniff "Drupal.Attributes.ValidHookNameSniff" does not exist. |
| nicxvan |
I confirmed it does exist here: vendor/drupal/coder/coder_sniffer/Drupal/Sniffs/Attributes/ValidHookNameSniff.php |
9️⃣ Wrap up - Thanks to all for contributing to the meeting./
Participants:
quietone, Alex Skrypnyk, bbrala, borisson_, longwave, Tyler Staples (nexusnovaz), nicxvan
Comments
Comment #2
quietone commentedComment #3
quietone commentedComment #4
borisson_This is the same as what we discussed. +1
Comment #5
quietone commentedThanks!