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

Script overwrites installed coding standards #42

Open
morganestes opened this issue Jul 18, 2017 · 2 comments
Open

Script overwrites installed coding standards #42

morganestes opened this issue Jul 18, 2017 · 2 comments
Labels

Comments

@morganestes
Copy link

Problem

In version 0.5.0, when I run wp-enforcer it removes the standards already set for a project.

Description

I have multiple coding standards installed in my project (WP Coding Standards and PHPCompatibility) and a script to set them for use with the project's PHPCS. When I run wp-enforcer, it only checks for wp-coding-standards/wpcs and removes the other standard on every run, which causes checks to fail because PHPCS can't find the expected sniffs.

Possible Resolution

It would be nice for WP Enforcer to honor the existing config and not remove the standards set, either by not forcing the standards inside the script or by appending wpcs to the installed_paths only if it's not present already.

@stevegrunwell
Copy link
Owner

Morgan, thanks for bringing this to my attention!

@stevegrunwell
Copy link
Owner

Heh, just ran into this myself; I'm going to refactor to use dealerdirect/phpcodesniffer-composer-installer, which will simplify the code in WP Enforcer and reduce conflicts.

stevegrunwell added a commit to liquidweb/wp101plugin that referenced this issue May 25, 2018
…gets fixed, since it interferes with PHP Compatibility sniffs :(
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants