I am trying the create a custom fxcop rule which checks for all the methods in target assembly having their names NOT starting with the CAPITAL letter. I am pretty successful in doing this but there is one problem.
The rule throws error for “delegate methods” as well, for ex. btnOk_Click which I don’t want, is there any way to identify/filter delegate methods in fxcop using any predefined property/method ?
I am trying the create a custom fxcop rule which checks for all the
Share
An idea would be to write custom code rules through the tool NDepend instead (Disclaimer: I am one of the developer of the tool).
NDepend is especially conceived to make easy custom code rules edition through LINQ query. The following Code Query LINQ (CQLinq) query covers your need:
Just write this code rule in NDepend query editor in VS, and get an immediate feedback:
NDepend code rule can be executed/validated live in VS, or can be executed at Build Process time and validated in a report.