Problem/Motivation

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.

Steps to reproduce

https://git.drupalcode.org/project/drupal/-/pipelines?page=1&scope=all&r... and see all the warning lights on the very first job.

Proposed resolution

We only need these checks on MR, not on-commit, so disable that rule.

Remaining tasks

MR.

User interface changes

API changes

Data model changes

Release notes snippet

Issue fork drupal-3405443

Command icon 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

fjgarlin created an issue. See original summary.

fjgarlin’s picture

Status: Active » Needs review

The phpcs should only run now on MRs.

poker10’s picture

Status: Needs review » Reviewed & tested by the community

Thanks, 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.

  • mcdruid committed 541bbe99 on 7.x
    Issue #3405443 by fjgarlin, poker10: [D7] phpcs job fails when run on-...
mcdruid’s picture

Status: Reviewed & tested by the community » Fixed

Sounds good, thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.