Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
phpunit
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
1 Dec 2023 at 08:11 UTC
Updated:
24 Jul 2026 at 14:43 UTC
Jump to comment: Most recent
The phpcs job fails when being run on-commit to the 7.x branch. This is because it tries to do a git diff and run phpcs on the modified files against the target branch, but there are none, as this only makes sense in the MRs.
D10 runs it against all the codebase, but we don't want to do this here, we only want it against new additions.
https://git.drupalcode.org/project/drupal/-/pipelines?page=1&scope=all&r... and see all the warning lights on the very first job.
We only need these checks on MR, not on-commit, so disable that rule.
MR.
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 #3
fjgarlin commentedThe phpcs should only run now on MRs.
Comment #4
poker10 commentedThanks, this looks good! I think the linting is just a benefit for D7, as we did not have it in DrupalCI, so I think it is sufficient to have it on issues/MR, if this is the most straightforward solution how to fix this. We will get rid of the orange exclamation mark and the noise from it.
Comment #6
mcdruid commentedSounds good, thanks!