Make WordPress Core

Opened 4 years ago

Closed 3 years ago

Last modified 3 years ago

#49722 closed defect (bug) (fixed)

Don't format before linting on Travis

Reported by: johnbillion's profile johnbillion Owned by: johnbillion's profile johnbillion
Milestone: 5.5 Priority: normal
Severity: normal Version:
Component: Build/Test Tools Keywords: has-dev-note
Focuses: Cc:

Description

When the lint:php job runs on Travis, the code is formatted (with phpcbf) before it's linted. This defeats the point of linting as it means problems that can be fixed with phpcbf get missed.

Ref: https://core.trac.wordpress.org/browser/tags/5.3.2/.travis.yml?marks=124-125#L110

Introduced in [45799]. @pento Is this intentional or was it something temporary that was supposed to be removed at a later date?

Change History (4)

#1 @pento
4 years ago

IIRC, phpcbf will return an error value if it makes any changes, so the subsequent phpcs commands won't be run. This was probably done for performance.

The composer format can probably be removed, I have no strong feelings either way on it.

#2 @johnbillion
3 years ago

  • Keywords needs-patch added; dev-feedback removed
  • Milestone changed from Awaiting Review to 5.5

#3 @johnbillion
3 years ago

  • Owner set to johnbillion
  • Resolution set to fixed
  • Status changed from new to closed

In 47741:

Build/Test Tools: Remove unnecessary formatting before linting on Travis CI.

Fixes #49722

#4 @desrosj
3 years ago

  • Keywords has-dev-note added; needs-patch removed
Note: See TracTickets for help on using tickets.