Closed el-hoshino closed 4 years ago
Looking at the code, I don't think this is related to the view being generic, but rather using _Preview
instead of _Previews
(in plural)
@marcelofabri Oh, yes. my bad, I didn't notice it should be plural 😱 I'll close this issue since it's not a bug
To be fair, it might not be a terrible idea to make _Preview
acceptable as well..? .-.
To be fair, it might not be a terrible idea to make
_Preview
acceptable as well..? .-.
Exactly, this also seems to be the default template in Xcode.
New Issue Checklist
Describe the bug
2791 resolved the problem with normal SwiftUI preview type names like:
But if
MyView
has generics like the code below, a lint error will still be triggeredComplete output when running SwiftLint, including the stack trace and command used
(Replaced exact file names with
XXX
)Environment
SwiftLint version (run
swiftlint version
to be sure)? 0.39.2Installation method used (Homebrew, CocoaPods, building from source, etc)? mint
Paste your configuration file:
Are you using nested configurations? If so, paste their relative paths and respective contents. No
Which Xcode version are you using (check
xcodebuild -version
)? Xcode 11.6 Build version 11E708Do you have a sample that shows the issue? Run
echo "[string here]" | swiftlint lint --no-cache --use-stdin --enable-all-rules
to quickly test if your example is really demonstrating the issue. If your example is more complex, you can useswiftlint lint --path [file here] --no-cache --enable-all-rules
.