vscode-swiftlint icon indicating copy to clipboard operation
vscode-swiftlint copied to clipboard

onlyEnableWithConfig confusion

Open goodwillcoding opened this issue 1 year ago • 1 comments

Is there more information on onlyEnableWithConfig. This does not seem to work. I have following directory structure

foo.code-workspace
bar\
  .swiftlint.yml

And it does not lint based on that file being present with the onlyEnableWithConfig option enabled.

I tried adding moving .swiftlint.yml to the same level as foo.code-workspace and it still did not work

foo.code-workspace
.swiftlint.yml
bar\
  .swiftlint.yml

I do NOT have and Swiftlint: Config Search Paths defined.

goodwillcoding avatar Nov 21 '23 19:11 goodwillcoding

If you want to only lint if there is a config, you also need to provide swiftlint.configSearchPaths along with swiftlint.onlyEnableWithConfig. I'll update the docs accordingly.

vknabel avatar Jun 22 '24 11:06 vknabel