Open braker1nine opened 1 week ago
I've already spent some time on a rough version of implementation. So if this is something that feels worth adding, I'm happy to work in a PR for it
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...