Most of my SwiftUI classes have an auto generated (from template) ClassName_Previews
class at the bottom of the file.
I'd like SwiftLint to ignore anything ending in _Previews
for ALL rules. Or anything that extends PreviewProvider
.
I know how to exclude files and directories, but not classes.
Is this even possible? Any help would be appreciated!
Edit: Since I have so many preview classes, I'd prefer not to manually have to add // swiftlint:disable all
and it's enable counterpart. I realize going forward I can add those lines into my template!
Here is possible variant