You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to add --parent-config argument to the lint command. That way we don't have to specify the parent-config: inside of the config file. The use case for this is that the parent config path is not known ahead of time and I need to pass it in from a temporary directory where it is pulled and I don't control the path of the directory.
This is how it would look
swiftlint lint --parent-config "path/to/config"
It would add the parent config to the .swiftlint config file it reads during execution.
The text was updated successfully, but these errors were encountered:
You can also pass multiple configurations to the command in which case the first configuration is treated as a parent and the second one as a child. Is this already sufficient for your use case?
@SimplyDanny I didn't know about this. This might work. Do you know if in this case any further children would still be able to override any rules if they want. e.g for this directory structure
.swiftlint.yml
ChildFolder
- .swiftlint.yml
OtherChild
- .swiftlint.yml
So in this case if I run swiftlint lint --config "some/parent/config" --config ".swiftlint.yml" would it allow the child folders to override rules? In any case I am going to try it out and if it works I'll close this ticket and comment here
I noticed another issue.. If I pass in the path to lint then the .swiftlint.yml config files are not read at all and it only runs the default rules and since I can't use nested configs when using --config argument that completely breaks it.
swiftlint lint sources/path will ignore the config defined at sources/path/.swiftlint.yml and instead just use the default rules.
New Issue Checklist
Feature Request
I would like to add
--parent-config
argument to thelint
command. That way we don't have to specify theparent-config:
inside of the config file. The use case for this is that the parent config path is not known ahead of time and I need to pass it in from a temporary directory where it is pulled and I don't control the path of the directory.This is how it would look
It would add the parent config to the
.swiftlint
config file it reads during execution.The text was updated successfully, but these errors were encountered: