Opened 3 days ago
Last modified 2 days ago
#65278 new defect (bug)
PHPCS scans can fail after running `build:dev`
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | 7.1 | Priority: | normal |
| Severity: | normal | Version: | 7.0 |
| Component: | Build/Test Tools | Keywords: | has-patch |
| Focuses: | Cc: |
Description
It seems that there are some cases where the PHPCS ruleset upstream within the gutenberg repository either differs or is not enforced the same way when compared to wordpress-develop.
@jorbin and I spotted this when running grunt prerelease locally after running build:dev in the 7.0 branch. The src/wp-includes/css/dist/registry.php file is not aligning array assignment operators (=>).
Change History (4)
This ticket was mentioned in Slack in #core by desrosj. View the logs.
3 days ago
#3
in reply to:
↑ 1
@
3 days ago
- Keywords needs-patch added
This ticket was mentioned in PR #11924 on WordPress/wordpress-develop by @khokansardar.
2 days ago
#4
- Keywords has-patch added; needs-patch removed
After running build:dev, the auto-generated registry.php file in css/dist is not formatted to WordPress coding standards and causes grunt prerelease PHPCS checks to fail.
Props desrosj.
Fixes #65278.
A few thoughts on this:
css/dist) implies that it only contains built CSS files. But thisregistry.phpfile is an outlier.buildscript upstream, so it would either need to be formatted after being built, or the script/tool building it should be updated to align=>operators.ignorelist inphpcs.xml.dist(and alsophpcompat.xml.dist) since it's not subject to version control. But if that were the case already, this would have been suppressed and not flagged to be fixed. If this path is chosen, then a full list of files that meet this criteria should be created and they should all be treated the same.gutenbergrepository) should ideally be considered for being added to version control for better tracking of changes over time through tools likegit bisect/git blame.