-
Notifications
You must be signed in to change notification settings - Fork 41
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
Configuration file handling #62
base: master
Are you sure you want to change the base?
Conversation
I'd like to also include a .dist file showing an example of the config file structure too (re: #13) |
This adds support for json config files, and brings in It includes a The supported file format at this point is {
"paths": ["list-of-paths"],
"ignore-paths": ["list-of-paths"],
"extensions": ["list-of-extensions"],
"whitelist-rules": ["list-of-rules"],
"blacklist-rules": ["list-of-rules"],
"disable-annotations": true|false,
"format": "dots|progress|lines|debug|xml"
} Instead of using Documentation is also missing at this point... |
This is now ready for review.. |
So the idea of a .dist file is to provide an example of the configuration without having a hard-coded config in the release. This way they can just copy over the .dist and use it as the config or they can make their own without having to worry about git marking it as an updated file. And since the lists in there are subjective to whatever the user's project is, it won't work with a default value like "list-of-paths" as you have there. You can use one of the pre-build commands in Travis to copy it over to the right place too. |
Ah ok, good point. If I understand correctly we don't want to parse the |
Yes, a |
Now there is a As you can see a travis build failed. This was an hhvm issue. Investigations show that PhpParser is not stable for hhvm. https://travis-ci.org/nikic/PHP-Parser To reflect this fact I changed our travis config so that hhvm failure is allow. With these changes this is again ready for review. |
Out of curiosity, why is the default file a dot file? I think I'd prefer to see it as an always-visible file. |
Oh, just my preference to keep "meta"-files dotted. But you are probably right. I'll change it later today.. |
Done.. |
I haven't tested everything out, but the code looks good. Presuming it all works, 👍 |
I'll have a look at this to make it up to date some time in the future... If anyone else wants to have a go please do 😄 |
Prepares for a configuration file by adding the ability of reading configs from multiple sources. Configuration handling is moved to the
Conf
namespace.Merging will close #13.