I'm working on a project in C# .net and WPF. We're using StyleCop to help bring a consistent style to the project, and after disabling some rules we're quite satisfied with it. However, I've heard people talk about FxCop, and that this would bring value to the project too. From what I understand this is more on a code structure base..?
Could someone give me any specific reasons why we should start using FxCop? What are the most important things FxCop will ensure that we do correctly?
FxCop provides a tool to help developers to follow their company's coding standards. FxCop does code analysis to check whether the new code is compliant with the coding standards and naming conventions followed by the company. FxCop will ensure that the specified rules are used in the source code.
StyleCop is a source code analysis tool that provides developers with an effective way to follow C# coding standards. FxCop runs against the compiled binaries as a way to understand and enforce the.NET Framework Guidelines for managed code assemblies.
It detects some useful conditions and can improve your coding style. By style I don't just mean bracket placement and so on. But issues such as abstract classes having public constructors and many other specalist cases. It's little things like this it picks up, and after a while you do them automatically.
Starting a new project with it is easy, using it with an existing project is harder as it will detect more issues. It's worth noting you will have to configure FxCop at first, as it will point out trivial things which may not be of concern.
FxCop works on compiled binaries, while StyleCop analyzes the source code directly.
Maybe you could to use it to check if a compiled assembly, as that you send to your QA/production environment, matches your company polices, if someone tries to bypass your StyleCop rules.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With