type_name
violation for with SwiftUI template code
#2791
Labels
enhancement
Ideas for improvements of existing features and rules.
New Issue Checklist
New rule request
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 atype_name
violation because it uses "_".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.This rule should just extend the current
type_name
rule.The rule should be enabled by default.
The text was updated successfully, but these errors were encountered: