Best practices for choosing diagnostic IDs?

Topics: APIs
Sep 3, 2014 at 1:18 AM
Is there any guidance around choosing IDs for Roslyn-based diagnostics?

Previously, StyleCop and FxCop both used two letters followed by four numbers (e.g. CA1000), and that same pattern is still used for the FxCop-like diagnostics included in VS "14" CTP 3. However, all examples and tutorials I have seen for creating Roslyn-based diagnostics use a more descriptive ID (e.g. "MakeConst").
Developer
Sep 3, 2014 at 4:49 AM
The FxCop pattern is not required, but likely still popular because they end up looking more like built in compiler diagnostic Ids. The only constraint on your ID is that it should work as a language identifier so you can use them with the pragma directives to disable them in the source code.