-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Merge nested configurations rather than replacing them outright #676
Comments
We were also facing this behaviour within our project. I would like to help by implementing this mini-feature. But before going there, I am considering an specific approach and I would like to see if this matches with other SwiftLint maintainers' vision. Instead of implementing the placeholder More specific:
Thanks! |
I don't think that's the right way to do this. For one, merging two |
Hi, I have started to implement this feature. |
Hi @ManWithBear , I think it'd be best to file a PR with the behavior your think is best, and we can review/adapt from there. |
Thanks @stephanecopin and @jpsim 💯 |
This feature seems to have broken cases where you wish the nested config for a rule to override the settings in the parent. |
@andrewtheis can you be a bit more specific? Please file an issue with more details about what you want compared to what the current behavior is. |
We currently just replace parent configurations with nested ones, but it'd be nicer and less confusing to users if nested configurations inherited their parents.
Current source: https://github.com/realm/SwiftLint/blob/0.10.0/Source/SwiftLintFramework/Models/Configuration.swift#L220-L225
See #675 for one case of such confusion.
The text was updated successfully, but these errors were encountered: