Can I kindly suggest that the doc says it is safe to suppress the warning when nested types are actually following the "builder" pattern, as found in System.Collections.Immutable namespace?
I understand that at large, nested types shouldn't be _encouraged_. But there are in fact cases where they actually make a lot of sense, and the builder pattern is one of those. If you have instances you want to be able to carry around as immutable but yet need to be initialized at some point, having a nested builder type for exactly that purpose feels much more elegant than polluting the namespace with a second type for each entity, or creating a new namespace for builders types with almost the exact same name (redundancy).
The way I'm reading the doc right now feels like ignoring this rule is as bad as hiding base class methods (CA1061) or not implementing IDisposable correctly (CA1063). That can't be right given that Microsoft itself chose to go against that rule.
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
@mavasani Should we say its OK to suppress the warning when nested types are following the builder pattern?
Yes, that sounds reasonable. Seems there is already a feature request to handle this case in the rule: https://github.com/dotnet/roslyn-analyzers/issues/3033
Thanks! Updating doc.