Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
The testbot does not run PHPCS on all files when core/phpcs.xml.dist is changed. Therefor the testbot passes, when there are files that break on the rule change and the testbot should fail.
Proposed resolution
Change the cor/scripts/dev/commit-code-check.sh so that PHPCS will check all files when core/phpcs.xml.dist is changed.
Remaining tasks
User interface changes
None
API changes
None
Data model changes
None
Release notes snippet
None
Comment | File | Size | Author |
---|---|---|---|
#8 | 3224583-7.patch | 2.04 KB | daffie |
#8 | 3224583-7-with-changed-phpcs-xml-dist.patch | 2.72 KB | daffie |
#8 | interdiff-3224583-2-7.txt | 539 bytes | daffie |
Comments
Comment #2
daffie CreditAttribution: daffie commentedAdded 3 patches:
Comment #3
daffie CreditAttribution: daffie commentedThe changed core/phpcs.xml.dist comes from the issue: #2937514: Fix Drupal.NamingConventions.ValidVariableName.LowerCamelName in tests.
Comment #4
daffie CreditAttribution: daffie commentedThe patch 3224583-2-with-changed-phpcs-xml-dist.patch should fail the testbot, only it does not. On my local machine it does fail however. No idea why it does not fail the testbot.
Comment #5
longwaveI think you need to set FINAL_STATUS=1 here...
...because STATUS is overwritten on every trip around the file loop.
Comment #6
dhirendra.mishra CreditAttribution: dhirendra.mishra at Valuebound for Valuebound commentedHere uploading my patch and inter-diff for above comment....Please review it.
Comment #7
longwavePlease can you also upload the same change applied to 3224583-2-with-changed-phpcs-xml-dist.patch - which should fail.
Comment #8
daffie CreditAttribution: daffie commented@dhirendramishra: Sorry for xposting. Thank you for helping with this issue.
@longwave: Thank you for your help.
Comment #9
daffie CreditAttribution: daffie commentedThe patch with a changed
phpcs.xml.dist
fails as expected. It even has failure that is not related to the change in thephpcs.xml.dist
:Comment #10
longwaveThanks @daffie! I guess we should have another issue to deal with that problem in TourViewBuilder, I wonder how that slipped in.
Comment #11
SpokjeIssue for the indentation issue created here
Comment #12
alexpottThis is not a bug. Coding standard issues are not bug fixes per se and neither is this a critical. That said this is nice functionality to have and it looks good. We should file follow-ups to do the same for JS and CSS files.
Committed and pushed 92a87eacc8 to 9.3.x and d64dc5c13c to 9.2.x. Thanks!
Comment #16
quietone CreditAttribution: quietone commentedThis is tagged for followups, #12, so checking to see if that has happened.
It has, the work was done in
I am removing the tag.