-
Notifications
You must be signed in to change notification settings - Fork 202
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
PHPCS support #541
PHPCS support #541
Conversation
paulschreiber
commented
Jun 8, 2018
- add phpcs.xml
- update composer.json
- gitignore vendor folder
- run PHPCBF to fix spacing problems
Script was stopping after no co-authors was find. Now script will display an error message and continue to the next post.
This reverts commit f759744.
This reverts commit 6e7da2b.
Script was stopping after no co-authors was find. Now script will display an error message and continue to the next post.
Resolves Automattic#417 * Removed duplicate left join for optimization
…bled() should do the trick now
This reverts commit 525f211.
This reverts commit 5ac7d9a.
Reduce amount of sleep
…r-posts Fixed WP CLI create-terms-for-posts if no co-authors found
Terminology updated throughout
…uthor Replace hardcoded 'author' with $this->$coauthor_taxonomy
Fixes warning: `Warning: sprintf(): Too few arguments in /path/wp-content/plugins/co-authors-plus/php/class-coauthors-guest-authors.php on line 487` Warning surfaces when deleting a guest author that is mapped to a WP user
Move parenthesis to fix esc_html and sprintf
…into fix/489-skip-filtering-for-irrelevant-caps
Tests are passing. Failure was a travis error for WP4.8:
|
* [Style] Identation changed to tab * [Feat] Added personal data exporter to guest authors * [Feat] Added a filter to allow third part plugins add guest author data * [Style] WPCS fixes * [Fix] Filter name changed * [Style] WPCS fixes * [Fix] Filter name changed
… of assertNotContains
…ests Re-enable disabled Test_Author_Queries tests
Add post type parameter to the Mine link, so it works for Pages
🐛Only filter author template for title
…repancy Fix possible discrepancy in author search with ignored authors
…ing-for-irrelevant-caps Skip irrelevant capabilities filtering in filter_user_has_cap() with whitelist
…ry-queries-on-multisite-test Removed Test_Author_Queried_Object setUp function
…linked-account column_posts() should use user_login when querying for linked_account
…count-guest-authors Fixing double posts counts for users with linked accounts
$ignored_authors in search should use user_nicename, not login.
@@ -22,6 +22,8 @@ | |||
"forum": "http://wordpress.org/support/plugin/co-authors-plus" | |||
}, | |||
"require": { | |||
"composer/installers": "~1.0" | |||
"composer/installers": "~1.0", | |||
"wp-coding-standards/wpcs": "^0.14.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should now be ^1.0
.
@@ -0,0 +1,14 @@ | |||
<?xml version="1.0"?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be named .phpcs.xml.dist
or phpcs.xml.dist
, and then add .phpcs.xml
and phpcs.xml
to the .gitignore
, so that folks can override it locally if they wish.
<?xml version="1.0"?> | ||
<ruleset name="WordPress Coding Standards for Co-Authors Plus"> | ||
|
||
<rule ref="WordPress-VIP" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't include WordPress-VIP
here. See #579
<rule ref="WordPress-Docs" /> | ||
<rule ref="WordPress-Extra" /> | ||
|
||
<arg value="s"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding flags to show progress, use shorter basepath, adding colors etc. The exact args available depends on what PHPCS version is installed, and that depends on what minimum PHP version should be supported.
|
||
<exclude-pattern>*/node_modules/*</exclude-pattern> | ||
<exclude-pattern>*/vendor/*</exclude-pattern> | ||
</ruleset> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By enabling some custom properties (see https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/wiki/Customizable-sniff-properties#properties-strongly-recommended-to-be-set) then extra checks, such as textdomains and deprecations will also be run.
Some of the config changes have been handled more recently, and some of the changes are now redundant. There is a lot of PHPCS to tidy up, but it's going to be needed to be done in smaller chunks. |