BT

SDK for StyleCop Released

| by Jonathan Allen Follow 548 Followers on Sep 02, 2008. Estimated reading time: less than one minute |

Unlike Microsoft's FXCop, which was largely celebrated as an important step towards improving the consistency and quality of .NET code, StyleCop has been viewed with much suspicion. The main difference between the two is that FXCop focuses on compiled code from any .NET language while StyleCop works solely against C# source code.

The biggest complain about StyleCop is that its recommendations are mainly based in opinion. While some of the guidelines in FXCop are subjective, most are grounded in sound logic based on a deep knowledge of how the CLR works. StyleCop, on the other hand, is mostly about hotly debated issues like how many spaces to use for indention. Some are even downright contrary to standard practices like placing "using" statements inside namespaces.

With the release of the StyleCop SDK, developers can develop their own rules to supplement or outright replace the default ones. While in the long run developers are going to want to be able to simple configure the rules to match their company standards, this is at least a good temporary solution.

In addition to creating new rules, developers will find information in the SDK on how to integrate StyleCop in MSBuild tasks.

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Of all the examples.. by Francois Ward

Some are even downright contrary to standard practices like placing "using" statements inside namespaces.


Of all the examples that could be taken... I wouldn't be surprised to someday find this particular one as part of FxCop... While many of StyleCops rules are subjective (read: make people sad because their "flawless" naming conventions are not all that flawless, or are totally obsolete as they're simply ported from older environments with different restrictions and requirements), that particular one has to do with how the compiler works, and is meant to catch as many errors as possible at compile time and remove ambiguity.



The standard Visual Studio templates have never followed -any- convention, and contredict each other...thats not new.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

1 Discuss

Login to InfoQ to interact with what matters most to you.


Recover your password...

Follow

Follow your favorite topics and editors

Quick overview of most important highlights in the industry and on the site.

Like

More signal, less noise

Build your own feed by choosing topics you want to read about and editors you want to hear from.

Notifications

Stay up-to-date

Set up your notifications and don't miss out on content that matters to you

BT