Skip to content
New issue

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

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

Already on GitHub? # to your account

type_name violation for with SwiftUI template code #2791

Closed
2 tasks done
marcelarubim opened this issue Jul 4, 2019 · 0 comments · Fixed by #2815
Closed
2 tasks done

type_name violation for with SwiftUI template code #2791

marcelarubim opened this issue Jul 4, 2019 · 0 comments · Fixed by #2815
Labels
enhancement Ideas for improvements of existing features and rules.

Comments

@marcelarubim
Copy link

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.

@marcelofabri marcelofabri added the enhancement Ideas for improvements of existing features and rules. label Jul 5, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement Ideas for improvements of existing features and rules.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants