Comments (8)
This can be run from the wp-cli-dev repo to quickly assess all packages [...]
I also use that script for doing things like this in a case like the above (built from memory and untested):
./foreach-bundle "git checkout -b fix/wpcs-3.0-issues"
./foreach-bundle "composer require --quiet --dev wp-cli/wp-cli-tests:^4 -W"
./foreach-bundle "git add composer.*"
./foreach-bundle "git commit -m 'Update to WPCS v3'"
./foreach-bundle "vendor/bin/phpcbf"
./foreach-bundle "git add --all"
./foreach-bundle "git commit -m 'Fix all autofixable CS issues'"
./foreach-bundle "hub pull-request -m 'Update to WPCS v3' -l 'scope:testing' -m 'Auto-generated PR that updates WPCS to the latest v3 and then runs PHPCBF to fix all automatically fixable issues.'"
This will create a pull request in each bundle repository. Those that pass their tests can be merged right away, the others will be starting points for additional commits to fix any remaining issues.
This has been the most scalable way for working on bundle-wide changes for me.
from wp-cli-tests.
This can be run from the wp-cli-dev
repo to quickly assess all packages:
./foreach-bundle "composer require --quiet --dev wp-cli/wp-cli-tests:^4"
./foreach-bundle "composer phpcs"
This way we can identify additional things we might want to add to the default PHPCS config, like for example https://github.com/wp-cli/wp-cli-tests/pull/176/files#r1310157136
At first glance it appears that most of the errors can be auto-fixed, reducing the amount of manual work involved with updating.
Edit: looks like you already tagged a new release; so I updated the command accordingly.
from wp-cli-tests.
I'm getting an odd warning with phpcbf
...
$ composer phpcbf
> run-phpcbf-cleanup
Deprecated: Creation of dynamic property WordPressCS\WordPress\Sniffs\PHP\NoSilencedErrorsSniff::$use_default_whitelist is deprecated in /Users/danielbachhuber/Desktop/admin-command/vendor/squizlabs/php_codesniffer/src/Ruleset.php on line 1331
. 1 / 1 (100%)
Edit: looks like you already tagged a new release; so I updated the command accordingly.
Yeah, I had to tag in order to start updating the dependencies.
This way we can identify additional things we might want to add to the default PHPCS config, like for example https://github.com/wp-cli/wp-cli-tests/pull/176/files#r1310157136
Want to submit a PR for that?
from wp-cli-tests.
I'm getting an odd warning with
phpcbf
...
You need to renameuse_default_whitelist
to usePHPFunctionsList
here:
wp-cli-tests/WP_CLI_CS/ruleset.xml
Lines 112 to 116 in bd3f6d6
Want to submit a PR for that?
I think we can do all of these ruleset updates in a single PR
from wp-cli-tests.
I think we can do all of these ruleset updates in a single PR
@swissspidy Sure... are you doing that?
from wp-cli-tests.
Started a PR here: #177
from wp-cli-tests.
I can run the above (and adapt as needed to create all initial PRs now. Let me do those, and then we can see what else might still need fixing.
from wp-cli-tests.
🎉
from wp-cli-tests.
Related Issues (20)
- composer prepare-tests error
- Add spellchecking
- Improve run-behat-tests for custom setups
- Using TEST_DB where it should be TEST_USER HOT 1
- Using the bundled PHP web server step triggers `Use of undefined constant WP_CLI_ROOT` warning HOT 3
- Run tests against Windows HOT 4
- WordPress.PHP.DisallowShortTernary has been removed in upstream development WordPress-Coding-Standards HOT 2
- Fix install-package-tests random build failures HOT 6
- Add linting for Behat feature files
- Indicate specific PHPCS issues in CI job
- cp -r causes issues with symlinks on MacOS HOT 1
- Properly support `@require-wp-latest` HOT 4
- Use alternative theme for testing as `P2` theme has been retired HOT 5
- Abandoned dependencies HOT 4
- Documented install command fails HOT 2
- `WP_VERSION` should default to latest patch if not provided HOT 4
- Move WPCS to v2.2.0 HOT 4
- Failed installation, dependency conflicts from locked versions of other packages.
- Setup issue, native wp functions not found, inability to complete prepare-tests HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wp-cli-tests.