How can I enable code style warnings like CA1002: Do not expose generic lists
(or any other "Code Analysis for Managed Code Warnings")?
Part of the link is:
When to Suppress Warnings
Do not suppress a warning from this rule unless the assembly that raises this warning is not meant to be a reusable library. For example, it would be safe to suppress this warning in a performance tuned application where a performance benefit was gained from the use of generic lists.
This let me think, the compiler should show this warnings by some way.
I tried this code (Which seems to be a reason for CA1002 according to this question):
public FooList : List<Foo>
{
}
It compiled fine without a warning. My warning level per project is already at max level 4:
So how can I enable the warnings?