bealex / SwiftLintAppCode

Provides highlighting of the SwiftLint errors in the AppCode
MIT License
52 stars 8 forks source link

Support nested configurations #52

Closed windaishi closed 3 years ago

windaishi commented 3 years ago

Hello,

seems like the plugin currently does not support nested config files.

The docs of swiftlint state that there can be nested config files that will be merged together. See: https://github.com/realm/SwiftLint#nested-configurations

However it seems like the plugin is using the CLI parameter --config. This disables the functionality that nested .swiftlint.yml files in your directory structure get merged into one. This is also documented in the docs:

So if you want to use use nested configurations, you can't use the -- config parameter.

(https://github.com/realm/SwiftLint#nested-configurations -> last line in the paragraph)

In our project we are using this feature. Unfortunately since the plugin only respects the top level config file, i cannot use the plugin currently.

Would ne nice if there will be a fix for this.

I suggest to add another config options to state whether to use or NOT use a different config file then the default one. When the option is disabled the plugin should just omit the --config parameter. Then everything should work smoothly.

bealex commented 3 years ago

Should be updated in 1.13. Please check (update should be available after JB review)

windaishi commented 3 years ago

Thank you. It is working with the new .1 release. Great work 👍

bealex commented 3 years ago

Perfect!