Active
Project:
Drupal core
Version:
main
Component:
other
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
5 May 2016 at 18:18 UTC
Updated:
20 Oct 2025 at 06:19 UTC
Jump to comment: Most recent, Most recent file
Follow-up to #2572659: Fix 'Drupal.Commenting.InlineComment.SpacingAfter' coding standard
Part of #2571965: [meta] Fix PHP coding standards in core, stage 1.
In line comments are missing the final final stop to complete the sentence.
Enable Fix 'Drupal.Commenting.InlineComment.InvalidEndChar
Most changes made by phpcbf but not all.
| Comment | File | Size | Author |
|---|
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
pashupathi nath gajawada commentedI will fix this.
Comment #3
vprocessor commentedI am on it
Comment #4
vprocessor commenteddone
Comment #5
mile23Patch does not apply:
Comment #6
vprocessor commentedComment #7
vprocessor commentedrerolled
Comment #8
klausiThere are changes in the patch which remove empty lines, which are not related?
Comment #9
mile23Let's add the rule we're applying here, rather than excluding all the others. That way we are sure the patch only touches the one rule.
Also, the patch does not apply.
Please: Modify phpcs.xml.dist to use the rule Drupal.Commenting.InlineComment.InvalidEndChar (instead of excluding the others), re-run phpcbf, run phpcs to make sure all the errors are dealt with, read the changes to make sure the changes are sane, and then re-run phpcs again to make sure your sanity changes didn't break something else.
Thanks.
Comment #13
reflie commentedRerolled, fixed some bugs manually.
Comment #15
borisson_Patch no longer applies
Comment #16
savkaviktor16@gmail.com commentedRe-rolled
Comment #17
borisson_Patch needs a reroll, sorry for not reviewing it early enough.
Comment #18
oleksiyComment #19
oleksiyComment #20
borisson_I applied the patch, then ran
composer phpcs, there are no remaining errors.Comment #21
alexpottPatch needs a reroll but also there's quite a bit more to fix.
Comment #22
alexpottChanges like this need a bit thought just sticking a full stop here doesn't seem quite right. There are other lists where this also does not look right.
Comment #27
sharma.amitt16 commentedComment #28
sharma.amitt16 commentedRe-roll for D9 as the patch #18 is failing on D9.1.x
Comment #29
sharma.amitt16 commentedComment #30
himanshu_sindhwani commentedHi @sharma.amitt16, I went through the patch. It seems to fix most of the issues
I see a full stop after the semicolon and there are 24 such instances in a patch. The semicolon needs to removed from here.
Comment #31
sharma.amitt16 commented@himanshu_sindhwani, thanks for the review of such a long patch. I have fixed your findings in this patch. Please review.
Comment #32
himanshu_sindhwani commentedSeems good to me now. But I am not sure if #22 is addressed.
Comment #33
sharma.amitt16 commented@himanshu thanks for review. #22 is not addressed in this patch as I am not sure whether to do this in scope of this issue or not as there are multiple such instances available in multiple files.
Also it is done as per sniff rule. IMHO, if it needs to fix then it should be done in separate issue.
Comment #34
longwaveWhile probably 90% of these are correct to change, there are lots of problems. I didn't scan the full patch but this is what I found on a partial review:
This doesn't make sense with the full stop.
This is misleading as the dot is allowed.
This is confusing now. Maybe the examples can be wrapped in double quotes.
This doesn't make sense, we don't need a full stop here.
This doesn't make sense with the full stop either.
This is misleading now, as you don't put a full stop in the code.
This is commented out code, it should end with a ; not a .
This is sample HTML, ending in a semicolon is correct.
Comment #35
mrinalini9 commentedComment #36
mrinalini9 commentedUpdated patch as per the changes suggested in #34, please review.
Comment #37
mohrerao commentedpretty long patcch for review :(. Did one full pass and below are some of my observations.
Can we change it to "chunk size calculation: floor((75 - strlen("=?UTF-8?B??=")) * 0.75)."
Still not addressed
We can remove this as Drupal 9 requires PHP 7.3 or higher and PostgreSQL 10.
Commented code. Leave as is.
Many places code or sample code is in comments. leave such comment as as is(without punctuation)
Comment #38
mrinalini9 commentedComment #39
mrinalini9 commentedUpdated patch as per the changes suggested in #37, please review.
Comment #41
spokjeComment #42
spokjeRe-roll of #39 in Merge Request.
Comment #44
spokjePostponed on #3207576: Problem with Drupal.Commenting.InlineComment.InvalidEndChar: //cspel
Comment #51
quietone commentedNo longer postponed. I rebased onto 11.x
Comment #52
smustgrave commentedWas a large MR to review but was easy. If anyone curious what the extra deletion is from
core/modules/pgsql/src/Driver/Database/pgsql/Connection.php deleted a commented out elseif line
Comment #53
longwaveSome feedback where the change makes the comment misleading - generally where we are listing punctuation in some way - plus some nitpicks and some weird cases where only some comments appear to be taken into account (especially in TaxonomyFieldAllTermsTest and EntityQueryTest).
Comment #54
quietone commentedI set this to NR for initial feedback because all I did was create and MR for the latest patch. I didn't expect it to become RTBC. Now that I look more closely the first thing I see is that the sniff is not enabled!
I will assign to myself and clean this up.
Comment #55
quietone commentedWhen autofixing a full stop is added to cspell ignore lines
// cSpell:ignore TÉXT äöüåøhello aouaohello aeoeueaohello Pácê.which results in spelling errors.
core/modules/file/tests/src/Unit/SanitizeNameTest.php:102:13 - Unknown word (Pácê)Comment #56
quietone commentedFound #3424914: Improve the cspell exception in Drupal.Commenting.InlineComment.InvalidEndChar which explains why only some cspell lines are failing. The sniff ignores lines where cspell is all lower case.
Comment #57
quietone commentedBut there are other problems with the sniff. Therefor postponing on the Coder issue.
Comment #58
quietone commentedComment #59
quietone commentedNo longer postponed.
I rebased and fixed the remaining.
Comment #60
lavanyatalwar commentedReviewing this.
Comment #61
smustgrave commentedBeen over 5 days so going to pick
Changes appear to be pretty 1 to 1. The extra deletions coming from core/lib/Drupal/Core/DrupalKernel.php.
Previous threads still appear to be open, 1-2 seem relevant
If you are another contributor eager to jump in, please allow the previous poster at least 48 hours to respond to feedback first, so they have the opportunity to finish what they started!
Comment #62
quietone commentedResponded to longwave's feedback.
Comment #63
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".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #64
quietone commentedRebase
Comment #65
borisson_I think this looks good. It does what it is supposed to do.
Comment #66
jonathan1055 commentedThere are eight unresolved threads in the MR. So I don't think this should be set to RTBC until those are addressed and closed. In contrib MRs you can set push rules to prevent merging when there are open threads, but I'm not sure if that is done in the Core workflow. But in anycase those comments should be checked, and closed if done. But I don't they all can be closed yet.
Comment #67
borisson_I think on every open comment there was a change already, but the comment was still left open.
Only your comment is still open, so I will put it back to needs work
Comment #68
jonathan1055 commentedThanks but many of the comments were not addressed, even if there was a later change. I've been through the entire list of chnages, and opened some more threads. It would be great if those who opened the earlier ones could check their own and close them when solved. Then we can really use the open threads as the driver to finally get this issue fixed.
Comment #69
quietone commented@jonathan1055, thanks for the detailed review!
I agree it would help if reviewers would resolve comments. Thanks.
Comment #70
smustgrave commentedTried to resolve the threads but some wasn't 100% sure on.
Comment #71
jonathan1055 commentedExcellent, you've reduced it from 24 unresolved threads to just 9.
One odd thing I commented on is why it appears that the 'Docblock' sniff is being excluded here?
https://git.drupalcode.org/project/drupal/-/merge_requests/505#note_477884
Comment #72
quietone commentedThere are different views here about how to format lists in in-line comments. So, I am going to make a child issue to fix the easy ones. That child won't be able to enable the sniff but it will reduce the noise on this MR.
Comment #73
quietone commentedComment #74
quietone commentedComment #75
jonathan1055 commented#3513596: Fix 'Drupal.Commenting.InlineComment.InvalidEndChar' coding standard, pt 1 has been merged, so unpostponing this now.
Comment #76
quietone commentedComment #77
quietone commented