Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing: Whitelist specific files for PHPCS #16772

Merged
merged 2 commits into from
Jul 29, 2019
Merged

Conversation

aduth
Copy link
Member

@aduth aduth commented Jul 26, 2019

Related: #16753

This pull request seeks to improve the PHPCS linting to avoid testing files in folders for local development. It can often be the case, either with Parcel (playground) or Docker local ./wordpress files, that the npm run lint-php file times out due to attempts to recurse deeply into these folder structures.

We could exclude more files as done in #16753, but I chose not to because the locations of PHP files are well-known and limited, and because I'm not convinced (with testing from -v verbose output of the phpcs command) that the exclusions were actually effective.

Testing Instructions:

Verify lint passes:

npm run lint-php

@aduth aduth added [Type] Build Tooling Issues or PRs related to build tooling [Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. labels Jul 26, 2019
@aduth aduth requested review from Soean and ntwb July 26, 2019 16:02
@aduth aduth force-pushed the update/phpcs-file-whitelist branch from b5fcd46 to 7f0a498 Compare July 26, 2019 17:20
phpcs.xml.dist Show resolved Hide resolved
@aduth aduth force-pushed the update/phpcs-file-whitelist branch from a7c9616 to 6123772 Compare July 29, 2019 12:28
Copy link
Member

@Soean Soean left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All 60 files are tested.

@aduth
Copy link
Member Author

aduth commented Jul 29, 2019

Out of curiosity, I looked to see if this had any impact on Travis build time.

Control: https://travis-ci.com/WordPress/gutenberg/builds/120989406
Variable: https://travis-ci.com/WordPress/gutenberg/builds/121081996

There is effectively no difference. I think this is expected, however; the primary benefit here comes in environments which include files not previously excluded from PHPCS, but targeted at local development and also not present in Travis (e.g. the Playground's .cache folder, local Docker /wordpress folder).

@aduth aduth merged commit b5a116b into master Jul 29, 2019
@aduth aduth deleted the update/phpcs-file-whitelist branch July 29, 2019 13:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Automated Testing Testing infrastructure changes impacting the execution of end-to-end (E2E) and/or unit tests. [Type] Build Tooling Issues or PRs related to build tooling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants