COPS….FxCop..!

This is going to be a small introduction to FxCop(FxCop is an application that looks into assemblies and recommends changes in design, localization, performance, and security improvements .Professionals who already know it,can please move over!When i first used this tool i didnt know that it would exist in the Microsoft Visual Studio tools.Now though it does ,thought it doesnt come installed and you would need to install it.It is located in Its located in  C:\Program Files\Microsoft SDKs\Windows\v6.0A\FXCop.(alternatively you can download from here..download).Once you have download it its pretty easy to start off.

Click on new project like shown below

image

Click on add target for analysis, and add the assembly you want to test for static code analysis.

clip_image002

And then click on Analyse button ..that it..over!You can see myriad rules which play havoc over your seemingly robust and secure code.This tool is meant for people who live the doctrine of MS rules and are ready to give their right hand for it!You can play with the various rules and ignore them if you want them.You can even create your own rules and analyse your code based on it.

image

But then we have the code analysis tool also!For the less informed,you can configure it when you click project properties and we have a tab for it which deals with it.

image

So whats the difference?They each have the same basic subset of rules they cover; but, each has some distinct rules that the other doesn’t catch.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s