-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Find phpcs.xml config file in parent directories #626
Comments
This is something I want to do, but it's not as simple as just looking up the tree because I want to combine this with the other related feature people ask for, which is to have PHPCS change standards when it finds a phpcs.xml file inside a directory. This allows you to have slightly (or completely) different standards for various parts of the codebase, which is helpful if you are including libraries, or want different standards for integration code or unit tests. This will probably only get added to the 3.0 version because it would be a lot easier with the refactoring I've done in the 3.0 branch. |
… and is used even if files are specificed on the CLI
… and is used even if files are specificed on the CLI
I decided that it would be better to not do this feature with the one that allows different standards in different parts of the tree. This new feature is now committed. |
…dstartofstatement-fix-dataproviders Tests/File::findStartOfStatement(): fix dataproviders
If you run
phpcs
from a directory below the level that the phpcs.xml file is phpcs doesn't use that config.After using eslint for a while I have gotten use to being able to call the
eslint
command from any directory and it honoring the.eslintrc
config. Eslint handles this with afindInDirectoryOrParent
method: https://github.com/eslint/eslint/blob/master/lib/file-finder.js#L57This would help editors also to be able to easily pick up the phpcs.xml config
The text was updated successfully, but these errors were encountered: