Problem/Motivation

core/scripts/dev/commit-code-check.sh is used by core committers and contributors for pre-commit checks, but it can be improved:

  • PHPCS, ESLint and Stylelint are invoked once for each file that needs to be checked, which is slow on large changesets
  • Support for DrupalCI can be removed as CI checks are done in GitLab pipelines without this script

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3574117

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

longwave created an issue. See original summary.

longwave’s picture

Status: Active » Needs review

Probably can do more here to reduce duplication, but let's start with this.

quietone made their first commit to this issue’s fork.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Looks like good improvements to me.

  • catch committed 30a44bbc on 11.x
    task: #3574117 Improve commit-code-check.sh
    
    By: longwave
    (cherry picked...

  • catch committed 838bc032 on main
    task: #3574117 Improve commit-code-check.sh
    
    By: longwave
    
catch’s picture

Version: main » 11.x-dev
Status: Reviewed & tested by the community » Fixed

Thought about trying to manually test this on another issue, but this only really affects committers so I think it's safe enough to commit and if we run into a problem we can always revert again.

Committed/pushed to main and 11.x, thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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