I would like to run a command to see all rules that FxCop will support (based on the DLLs in its Rules directory).
Is this possible?
I would like to run a command to see all rules that FxCop will support (based on the DLLs in its Rules directory).
Is this possible?
Copyright © 2021 Jogjafile Inc.
The rule list can be viewed in the Rules tab of the FxCop UI (e.g.: http://www.binarycoder.net/fxcop/html/screenshot.png).
If you want a text version and don't have a screen clipping tool that will allow you to extract this from the UI, the rules list is pretty trivial to extract with a bit of reflection. You can either invoke internal types and methods in the FxCop object model to do this, or you can look for concrete classes that implement the
Microsoft.FxCop.Sdk.IRule
interface in the rule assemblies. e.g.: