Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

`type_name` violation for with SwiftUI template code #2791

marcelarubim opened this issue Jul 4, 2019 · 0 comments · Fixed by #2815


Copy link

commented Jul 4, 2019

New Issue Checklist

New rule request

  1. With the new code templates from SwiftUI and XCode previews, to render a View struct with Preview it is necessary to define a struct YourView_Previews: PreviewProvider. But to name a struct as such is a type_name violation because it uses "_".

  2. So it would be nice if we have either this exception of allowing structs that inherit from Previews with _Previews in the end of the name.

  3. This rule should just extend the current type_name rule.

  4. The rule should be enabled by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.