You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is more of an edit to an existing rule than a new rule, so apologies if this is the wrong format... Add a boolean option to the Nesting rule. When this option is enabled, enum's conforming to CodingKey won't count as violations of nesting.
My main argument for this is that CodingKey's are less of a nested "type" and more of an annotation of the current type for Codable If you have types that have custom CodingKey types, you basically lose a
Sounds like a reasonable exclusion. However, I recommend adding this only as an option to the rule. So the default behavior of the rule doesn't change.
If you have worked on a PR already, please go ahead and propose it. I'll be glad to have a look at it.
New Issue Checklist
New rule request
This is more of an edit to an existing rule than a new rule, so apologies if this is the wrong format... Add a boolean option to the Nesting rule. When this option is enabled, enum's conforming to
CodingKey
won't count as violations of nesting.My main argument for this is that CodingKey's are less of a nested "type" and more of an annotation of the current type for
Codable
If you have types that have customCodingKey
types, you basically lose aTriggering
Non Triggering
I think I would propose this be an opt-in setting on the nesting rule.
Looking at the criteria in the README
I think this change would actually reduce false positives
I don't think this would be an issue
I'm not sure if there's consensus here. And it's a very specific case...
The text was updated successfully, but these errors were encountered: