my swiftlint.yml file is not excluding my "Generated Mocks" folder. I’ve tried Generated Mocks
and 'Generated Mocks'
Is there a solution to this?
excluded:
- Pods
- MyProjectTests
- MyProject/Helpers/Constants.swift
- Generated Mocks
edit: The Generated Mocks folder was generated from a dependency I added so I hope that helps
2
Answers
Instead of writing excluded commands in swiftlint.yml file, simply use included command and add your project path, tests etc. in here (paths where you want your swiftlint to run).
For instance, my swiftlint.yml file looks like this:
I only have a included command and I added paths where I want my swiftlint rules to work.
to:
Build the project, you’ll see that your SwiftLint warnings will show only for your included folders & files.
Another approach would be to change the destination folder name from Genera†ed Mocks to GeneratedMocks, and then use this in .yaml (works for me):