Utility code to help build FxCop custom rules.
This project is a collection of utility classes and custom rules. The purpose of the custom rules are two fold. First they should be usable. Some will work without any modification and some will require deriving your own rule to fill in information specific
to your application. The second purpose of the custom rules is to show how custom FxCop rules can be written. (Notice I said "can" not "should".)
- Makes working with Cci a little easier.
- Processes the InitializeComponent method and associated resources to get control information.
- Use with ComponentDictionary to cache values used by multiple rules.
- Holds information about an event.
- A bunch of methods to help work with IL instructions. This is probably going away because I'm switching over to using the Visit methods.
- Methods to help work with TypeNodes.
- Flags issues where the backing field is not the same as the property.
- Verifies that base.Dispose(bool) is called from overrides of Dispose(bool) methods.
- Verify that this.components.Dispose() is called if the this.components field exists and was initialized in the InitializeComponent method.
- Verifies that components such as WinForms and UserControls are localizable.
- Flags where ToString is called on something that is already a String.
- Finds attributes that should be removed.
- Finds simple code changes that can help performance.
- Guidelines for WinForms accessibility. Specifically for screen reading software.
- Flags fields that are only set in the constructor and can therefore be flagged as readonly.
- Checks that events are raised correctly.
- Flags empty event handlers so they can be removed.
- Flags try/catches with nothing in the try.
- Flags typecasting performance issues.
- Use char instead of string in methods that can take either and the string is a single character long.
- Not 100% yet and only works on debug code. Checks that the strongest type is used for variables and return values.
- Finds places where you can switch to using typed DataSet features if you are already using a typed DataSet.
- Similar to FxCop but uses StyleCop.
- Some useful helper for MSTest. The test project uses this.