Microsoft release source analysis tool

Microsoft have launched a new source analysis tool called StyleCop, similarly named to thier other analysis tool FxCop, but whereas FxCop is intended to check for good practice and standards against assemblies, StyleCop is more about checking good practice and standards in the source code itself.

Full details can be found on the MSDN Blog.

Initiatives towards encouraging well written, readable code are generally a good thing but it appears some already have some gripes with the standards MS are recommending with this tool – particularly with respect to the use of spaces over tabs – and the fact that, unlike FxCop, it is not possible to define one’s own rules, although having a set of common standards does imply one set of standards and not every “joe programmer’s” set of rules!

Also, it seems the tool simply reports the issues, which is as one would expect, and this has led some to propose that it should additionally perform a productivity function by automagically fixing all the issues as well.

It could be argued that in some respects it’s a good thing for a developer to return to thier code and manually correct these issues, since it might encourage a “right first time” approach in the future but with real world practicalities (deadlines et al!) I guess it’s a tough call to make.

Regardless, I’ll certainly be giving it a whirl – and correcting those issues …if I have time 😉

Update: 27/05/2008

It seems you can configure the tool to enforce or ignore specific rules.

Additionally when I took a look around the settings panel, under the “Settings Files” tab there are options to merge with additional settings files – as yet however I can find no documentation on how to create a settings file!

Advertisements

1 comment so far

  1. Paul on

    If you make configuration changes, it’ll create a settings file in your project directory — you can then move that file somewhere else and use it as the merge-base for all the projects in a directory tree or on the same machine.

    Also, it is possible to create your own rules: http://lovethedot.blogspot.com/2008/05/creating-custom-rules-for-microsoft.html


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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: