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 doc block in tests for the 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
Adding the followups that have been made.
- #3340142: Convert testJail() to use expectException
- #3340147: Convert testSkipSecurityFilters() to a unit or kernel test
- #3344633: Remove possible duplicate test XssUnitTest::testBadProtocolStripping
User interface changes
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #36 | 3268809-nr-bot.txt | 90 bytes | needs-review-queue-bot |
Issue fork drupal-3268809
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:
Comments
Comment #2
quietone commentedComment #3
quietone commentedComment #4
quietone commentedComment #5
quietone commentedComment #6
quietone commentedUpdate the patch with a simplified drupalci.yml.
Comment #7
quietone commentedThe commit-code-checks passed, this is ready for review.
Comment #8
jatingupta40 commentedI will review this #6 patch.
Comment #9
jatingupta40 commented@quietone I tried applying #6 patch but got 2 errors.
Thanks.
Comment #10
mrinalini9 commentedRerolled patch #6 for 10.0.x, please review it.
Comment #11
quietone commentedTime for a reroll
Comment #12
ravi.shankar commentedAdded reroll of patch #10 on Drupal 10.0.x. and removed needs reroll tag.
Comment #13
smustgrave commentedSeems to be some failures in the tests.
Comment #14
spokjeNeeds a reroll.
Also, when running this locally, there are quite a few new functions after the time of the last patch that have multiple-line short descriptions, so they have to be changed as well.
Comment #15
medha kumariRerolled the patch #12 in Drupal 10.0.x.
Comment #16
smustgrave commentedStill appear to be failures in the patch.
Also for #14 this should be checked.
This can be tested by commenting out in the phpcs file.
Applying the patch
Running the commit-code-check.sh and verifying the files being addressed here are passing.
Comment #17
quietone commentedIn case anyone is wondering what
commit-code-check.shis, have a look at the instructions for running the coding standard checks locally so you can be sure the tests will run before uploading a patch. It also has the advantage of saving resources, including money, for the Drupal association. There are real costs for running the tests.Comment #19
quietone commentedRestore drupalci and now setting back to NR.
Comment #20
smustgrave commentedTested the same way as before.
Commented out phpcs exclude line and ran the code-commit-check.sh and confirmed the files being addressed in this ticket are not throwing errors.
Change looks good to me then.
Comment #21
smustgrave commentedWent back and reread them and they look fine
Only one that stood out for maybe a second opinion is but the brief work I've done in Xss.php those sounds right.
Comment #22
xjmCan I ask in advance of reviewing this one that it also be converted to an MR? There will be suggestions. I can tell already by the second hunk. :)
Comment #23
quietone commented@smustgrave, thanks for reading the changes.
@xjm, all of these siblings have been converted to MRs.
Comment #24
quietone commentedSetting back to Needs review.
Needs followup to look at \Drupal\KernelTests\Core\Common\XssUnitTest as mentioned in this comment
Comment #25
smustgrave commentedOpened #3337286: Look into XssUnitTest Comments for the followup
That appeared to be the only open thread I could tell.
Comment #26
xjmHiding patches for clarity.
Comment #27
xjmAdded a couple more suggestions. "Test module" is not a helpful file docblock. One of the proposed docblocks also went against our coding standards by not having complete sentences.Thanks!
Comment #28
xjmSorry, that comment was meant for the other issue.
Comment #29
xjmI started from the end of the MR this time, because I confused this issue with another one. I guess there are at least three issues related to this rule.
Comment #30
xjmFixing attribution.
Comment #31
quietone commentedNeeds a followup for this comment, https://git.drupalcode.org/project/drupal/-/merge_requests/3278#note_149676
Comment #32
quietone commentedAll followups made
Comment #33
quietone commented#3340147: Convert testSkipSecurityFilters() to a unit or kernel test
#3344633: Remove possible duplicate test XssUnitTest::testBadProtocolStripping
#3340142: Convert testJail() to use expectException
Comment #35
quietone commentedThis is ready for reviews.
Comment #36
needs-review-queue-bot 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 #37
quietone commentedRebased and tests are running
Comment #38
smustgrave commentedTook another shot at this. 95 is a lot of changes and covering a wide range of topics. But looking at what's there, they make sense and tell me what the test does.
Comment #39
longwaveA few nitpicks but this is looking almost ready to go.
Is it possible to enable this rule for tests only in phpcs.xml.dist to avoid future regressions?
Comment #41
quietone commented@Rishabh Vishwakarma, thanks for the interest in this work. Please make your commit message reflect the changes that you have made. The commit message at the bottom of an issue is for a maintainer to use when committing to a project. I also recommend that you use the suggestions feature in GitLab when working on coding standards issues that are using an MR.
Comment #42
quietone commentedTime for a review again.
Comment #43
smustgrave commentedDon't mind marking this.
These are not my best but reading through the changes they make sense to me.
Comment #44
longwaveRe #39 this is not quite possible at present;
Drupal.Commenting.DocComment.ShortSingleLinedoes not distinguish between class comments and method comments, and while this issue solves the class comments in tests, there are still about 130 method comments that are longer than one line.Comment #48
longwaveRe-reviewed the whole patch and I couldn't find anything else to nitpick at. We can catch any stragglers in a followup when we eventually enable the Coder rule.
Committed and pushed to 10.1.x and backported to 10.0.x and 9.5.x to make future test backports easier. Thanks everyone!
Comment #49
andypostIt needs quick-fix as CI testing failed for 10.1 branch - https://www.drupal.org/pift-ci-job/2635635
moreover it broke testing patches https://www.drupal.org/pift-ci-job/2635665
Comment #52
catchReverted from all three branches - this is a conflict with the new @covers rule from phpunit-phpstan
Comment #54
spokjeComment #55
andypostLocally it passes after https://git.drupalcode.org/project/drupal/-/merge_requests/3577/diffs?co...
Hope bot will be green
Comment #56
Manoj Raj.R commentedReviewed and looks good to me as well.
Comment #59
longwaveRe-committed to 10.1.x, 10.0.x and 9.5.x. Thanks again!