Repository navigation
Conversation
Generated by 🚫 Danger |
|
Just a note regarding the changes / fixes to rule configuration: As SwiftLintBot noted, with this new implementation, 3 warnings in Moya are now fixed. In fact, previously those have been false positives, as in the nested As the parent rule configuration was used for merging and there was no smart mechanism to decide which configuration to choose, the configuration originating from the nested configuration was ignored. With this PR, that's now fixed. |
f0a9031 to
d9ca393
Compare
|
Thanks for kicking this off @fredpi! This is a very commonly requested feature. I haven't taken a close look just yet, but I can comment on the two failing CI jobs. The first is because the The second failing job is TSan detecting a data race because You can run this yourself locally with |
74f423c to
e19f666
Compare
|
@jpsim Thanks for giving me a direction how to make the tests work - they are all passing now 👍 |
|
Thinking through this feature a bit, I wonder if we should consider how this could live alongside #2729. Can we align these to use the same mechanism for pulling in external (sub)configurations? Seems like we should be able to align them, and maybe even come up with a single unified solution. |
|
Would it be attainable in this PR to pass multiple swiftlint configuration files through the command line? |
74cebcd to
af16faa
Compare
|
@jpsim @acecilia Sorry for my late reply ;) Your suggestions to combine this feature with a GraphHowever, this may require more refactoring, as all configuration files used to build the final configuration and their relationship must be stored, resulting in a graph that has some requirements to represent a valid configuration:
Configuration InterferencesHow would you handle interferences between the Nested ConfigurationsAnother issue comes with nested configurations: Consider a setup with the two configurations A, B on the root file level and configuration C one level deeper. A has B as its Previously, this could be ensured by only allowing |
5cad453 to
fe751a9
Compare
|
I'm assuming you're still working through the CI failures, let me know if you'd like some help. |
|
@jpsim Thanks for offering help – I'm still in the process of completely rearranging this PR to also allow for parent configs, multiple configs via the command line and remote configs. This will still take some time and I will drop a notice when I think I'm done ;) |
fe751a9 to
7a780ec
Compare
ad89e12 to
94efa37
Compare
7c29552 to
58bebe7
Compare
9f676eb to
885316a
Compare
|
This PR is approaching its completion – only tests (+ bugfixes?) are missing as of now Change Overview
|
ea0776f to
c128253
Compare
- Disable system-caching of remote configs - Disallow remote configs to reference local configs - Fix cycle & ambiguity detection & validation - Fix root directory of references in subdirectory configs
f2c0765 to
dae01f1
Compare
|
Closing this, as I created a new PR for these changes: #3058 |
This PR closes #1352 by introducing
a newsub_configoption that can be used in any configuration file. Thesub_configmust reference a file on the same level so that the option isn't confused with nested configurations. Thesub_configfeature also allows asub_configto itself specify asub_config. There's also a reference cycle detection.Scroll down for an updated version of what this PR implements.
I'd love to see this merged as soon as possible, as I'm eagerly waiting to use this feature.