-
-
Notifications
You must be signed in to change notification settings - Fork 493
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
Build/Travis/PHPCS: various minor improvements #1316
Conversation
I'd prefer not to including the preceding period in the filename rename, I'd much prefer it be renamed to
|
For what it's worth:
|
I ❤️ "dotfiles", I've even my own dotfiles repo. The preceding period means that the file will be hidden from a standard directory listing I'd rather the single change that is being made here in this PR rather than multiple changes elsewhere to maintain a nomenclature consistency throughout the WordPress ecosystem |
Why ? The WPCS PHPCS ruleset is intended just and only for the WPCS repo and is not suitable for, nor intended for other WordPress related projects.
Ok, so here my English is failing me. What do you mean by this ? |
This file was initially placed in the `bin` directory so as not to confuse users looking for the example custom ruleset. By renaming the file to `.phpcs.xml.dist` - take note of the `.` -, which is possible since PHPCS 3.1, the file is no longer listed directly next to the example ruleset, so it should be fine to move it to the repo root directory.
As the WPCS own ruleset is now in the root directory, we can add the `<file>` directive. This allows: - devs to run the CS check locally without command-line arguments - Travis to run with less command-line arguments.
... for optimal results from the tokenizer.
ad52761
to
760bbbb
Compare
FWIW, I'm easy on the naming. We are a Standard after all, and can use the latest PHPCS for ourselves, so there doesn't seem to be a reason not be a good example of how to do things. WP Core, and likely whatever other repos Stephen refers to, use at least PHPCS 3.1, so they can choose, based on their own setup, whether they want to use the leading dot or not. I don't think there a massive amount of value (or hinderance by including a "(or Knowing that there is an option on naming (and let's not forget, you could call it Aside: What bugs me more is that PHPUnit doesn't support the leading |
@GaryJones I'd say: add your voice to the open issue at PHPUnit: sebastianbergmann/phpunit#3030 |
Build: move WPCS's own ruleset to the root directory
When the WPCS native PHPCS ruleset was introduced in PR #590, this file was initially placed in the
bin
directory so as not to confuse users looking for the example custom ruleset.By renaming the file to
.phpcs.xml.dist
- take note of the.
-, which is possible since PHPCS 3.1, the file is no longer listed directly next to the example ruleset, so it should be fine to move it to the repo root directory.[Update]: I'd originally forgotten to adjust the
.gitattributes
,.gitignore
andContributing
files for this change. I've now updated those to match and amended the original commit to include those changes.Build/PHPCS: add the
<file>
directiveAs the WPCS own ruleset is now in the root directory, we can add the
<file>
directive.This allows:
lessfewer command-line arguments.Build/PHPCS: run PHPCS against the highest stable PHP version
... for optimal results from the tokenizer.
Build/Travis: drop support for HHVM
This has been brought up numerous times previously, but at those times, the builds for HHVM were still passing, so no effort was needed to maintain support.
However... the builds against HHVM have not been passing for quite a while now, so now might be a good time to (finally) drop support for HHVM.