Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#49722 closed defect (bug) (fixed)

Don't format before linting on Travis

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

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
6 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
6 years ago

  • Keywords needs-patch added; dev-feedback removed
  • Milestone Awaiting Review5.5

#3 @johnbillion
6 years ago

  • Owner set to johnbillion
  • Resolutionfixed
  • Status newclosed

In 47741:

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

Fixes #49722

#4 @desrosj
6 years ago

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