Problem/Motivation
The changes required for 'Drupal.Commenting.DocComment.ShortSingleLine' are too large and need to be split into child issues.
Proposed resolution
Fix class property comments for sniff 'Drupal.Commenting.DocComment.ShortSingleLine'.
Remaining tasks
Patch
Review - Instructions for adding the sniff and running the test are in the Issue Summary of #3123060: Enable 'Drupal.Commenting.DocComment.ShortSingleLine' coding standard
Commit
User interface changes
API changes
Data model changes
Release notes snippet
Comment | File | Size | Author |
---|---|---|---|
#46 | 3268833-46-9.5.x.patch | 77.31 KB | quietone |
#46 | diff-9.5.x.txt | 17.45 KB | quietone |
#46 | 3268833-46-10.0.x.patch | 77.29 KB | quietone |
| |||
#46 | diff-10.0.x.txt | 16.33 KB | quietone |
Issue fork drupal-3268833
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3268833-fix-method-comments changes, plain diff MR !1962
- 3268833-10.1.x changes, plain diff MR !3538
Comments
Comment #2
quietone CreditAttribution: quietone at PreviousNext commentedComment #3
quietone CreditAttribution: quietone at PreviousNext commentedComment #4
longwaveI read through the entire patch and all the comments make sense to me.
Comment #8
xjmAdding additional credits from the original issue.
I'm going to convert this one to an MR; there are a number of things I think we should fix on scan and the MR's "suggestion" feature might make it easier for a docs patch like this.
Comment #10
xjmGot about halfway through it, down to
core/modules/media/tests/src/Functional/UrlResolverTest.php
. Will come back to this more later. Someone could review and decide whether to accept the many proposed suggestions in the meanwhile. :)Comment #11
xjmReviewed down to
core/modules/system/tests/src/Functional/Form/ElementsLabelsTest.php
so far; more suggestions. :)Comment #12
xjmDown to
core/modules/taxonomy/tests/src/Kernel/Migrate/d6/MigrateTermNodeTest.php
now.Comment #14
xjmAdding issue credt for @DanielVeza who reported #3269018: Fix obsolete reference to entity_load_multiple. This MR is also fixing that already, so I closed it as a duplicate.
Comment #15
quietone CreditAttribution: quietone at PreviousNext commentedLet's get this up to date.
Comment #17
ravi.shankar CreditAttribution: ravi.shankar at OpenSense Labs commentedResolved merge conflicts and updated the MR, removing the needs reroll tag.
Comment #18
quietone CreditAttribution: quietone at PreviousNext commentedBack to need review.
Comment #19
smustgrave CreditAttribution: smustgrave at Mobomo commentedTested this locally by commenting out the line in the phpcs file and running on the files from the diff.
Comment #20
quietone CreditAttribution: quietone at PreviousNext commented#19. All the instances reported are out of scope for this issue. I know, one can get lost on which subset of the problem these issues are focused on.
They are either a class comment or a class property comment. Class comments are being done in #3268809: Fix class comment doc blocks in tests for 'Drupal.Commenting.DocComment.ShortSingleLine'. Class property were done in #3268829: Fix class property comments for Drupal.Commenting.DocComment.ShortSingleLine and it looks like a few were missed. If there are only a few of these, then we may be able to done them in the last issue of this sniff. #3123060: Enable 'Drupal.Commenting.DocComment.ShortSingleLine' coding standard.
I am setting back to NR.
Comment #21
smustgrave CreditAttribution: smustgrave at Mobomo commentedThanks @quietone
there's one thread
Does this need to be addressed?
Comment #22
smustgrave CreditAttribution: smustgrave at Mobomo commentedSo believe all the points have been addressed? Large MRs certainly are difficult.
Comment #23
needs-review-queue-bot CreditAttribution: needs-review-queue-bot as a volunteer commentedThe Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #24
quietone CreditAttribution: quietone at PreviousNext commentedRebased and tests passing, restoring RTBC
Comment #25
longwaveThis needs reroll for 10.1.x.
Is there a way of enforcing this partial fix in phpcs.xml.dist?
Comment #26
jungleI did rebase on my local, instead of force pushing now, attaching a patch with
git diff 10.1.x > ~/3268833-26.patch
, in case i mess up the MR.Comment #27
xjmPlease don't switch these issues back to patches; they're really much harder to review as such. If you are worried about a force-push, you can try merging HEAD instead, or open a second MR temporarily.
Comment #28
xjmThe PHPStan error is:
Comment #29
xjmI was able to rebase this through the UI without any issues, so hiding the above patch.
Comment #30
needs-review-queue-bot CreditAttribution: needs-review-queue-bot as a volunteer commentedThe Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #31
jungleRepost here.
Sorry, I could not do it, because 10.1.x is not a valid reference on the current fork. Or please edit the target branch of the MR to 10.1.x.
Thanks!
Comment #32
xjm@jungle You do this by creating a new branch and new MR within the same repository. I did so just now by:
...Then clicking the "Open merge request" button for the new branch.
Comment #34
xjmJust a note, I deliberately did not push any commits, because I noticed some bad hunks in the above patch. But the MR is functional, at least. :) Edit: Except I did just accidentally push it, which I am going to force-push away because of said bad hunks.
Comment #35
xjmUpdated with force push. Here's how I made this:
git checkout -b 3268833-10.1.x 3268833-fix-method-comments
I resolved this by accepting the HEAD version for most of it, but capitalizing "URL" in our updated one-line docblock summary.
git push --set-upstream drupal-3268833 HEAD --force
Comment #36
xjmNote that there are several open threads on the previous merge request, so we should verify that those three threads are addressed before marking this RTBC again.
Edit: Note for committers, I also did not finish my previous committer review due to the diff size being outside the best practices for lines to review in one change set. I was into the taxonomy namespace. So methods after that may still have grammatical and similar errors that I was pushing back on earlier in the issue.
Comment #37
xjmHiding bot output files.
Comment #38
xjmI reviewed a little bit further, to
core/modules/user/tests/src/Functional/UserCreateTest.php
.Note: A quick scan of the lines after those I reviewed revealed that no one has taken my previous suggestion of extrapolating and applying our other standards to later hunks. In general, one-line summaries should:
Additionally, function, method, or class names should generally not be referenced in one-line summaries; rather, functions and methods should instead be added to the
@see
section of the docblock (with fully-qualified namespaces), or@covers
where that applies.Comment #39
quietone CreditAttribution: quietone at PreviousNext commentedTime for another review.
Comment #40
smustgrave CreditAttribution: smustgrave at Mobomo commentedlet 1 comment on the thread. Not sure if it should move to NW for that.
If non issue +1 for RTBC
Comment #41
smustgrave CreditAttribution: smustgrave at Mobomo commentedSince it's been a week will go ahead and move this along to the committer.
Comment #42
quietone CreditAttribution: quietone at PreviousNext commentedSetting back to NR because changes where needed to @covers. See the last commit.
Comment #43
smustgrave CreditAttribution: smustgrave at Mobomo commentedFix for @covers seems fine to me.
Comment #45
longwaveCommitted and pushed to 10.1.x. Didn't apply cleanly to 10.0.x or 9.5.x, leaving open for possible backport to make other cherry picks easier.
Comment #46
quietone CreditAttribution: quietone at PreviousNext commented@longwave, thanks!
Patches attached for 9.5.x and 10.0.x. For 9.5.x, there was one conflict, in \Drupal\Tests\user\Kernel\Migrate\d6\MigrateUserRoleTest::assertRoles. For 10.0.x, the patch applied cleanly but I still made a new patch.
Comment #49
longwaveCommitted and pushed to 10.0.x and 9.5.x, thanks!
Comment #54
longwaveThe commits and reverts are because I committed #3123060: Enable 'Drupal.Commenting.DocComment.ShortSingleLine' coding standard with the wrong commit message.