feat: multiple configuration files
TorstenDittmann opened this issue Β· comments
In an organization we can be using a global configuration for pint and use it as a composer dependency and we would be using it like this:
pint --config vendor/my-company/coding-style/pint.json
Now some repositories where this is consumed, might need to add configuration on top, like exclude
, notPath
or notName
.
Scenario:
- Have a global configuration file with some rules.
- Consume it via composer in multiple repositories
- Needing to exclude some paths relevant to some repositories on top of the global configuration
I can see 2 approaches on how to solve it:
pint.json
can take a file path inpreset
or add a newextends
value. Downside is, this could lead into a recursion hell and therefore also with a more complex implementation.- Allow passing multiple
--config xxx.json
arguments and merge the configurations by order. Likepint --config vendor/my-company/coding-style/pint.json --config pint.json
.
I wouldn't mind working on this feature and can provide a PR ππ»
PS: Created a draft PR for the second approach at #175.
Thank you for submitting this feature proposal for Pint. Unfortunately, at this time, we do not have plans to add this feature to Pint.
Thank you for submitting this feature proposal for Pint. Unfortunately, at this time, we do not have plans to add this feature to Pint.
What would be the recommended steps to achieve this use-case? π
This kinda blocks us from implementing such a global ruleset to our ~50 PHP repositories ππ»
I would also want a global base config file. I get that for collaborative projects it's a good idea to commit the Pint config file, but I also use the global version locally on a lot of random projects that might not be committed to VCS and where it would just make more sense to just have a local base config.