Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News SDK for StyleCop Released

SDK for StyleCop Released

This item in japanese


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


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.

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

Community comments

  • Of all the examples..

    by Francois Ward,

    Your message is awaiting moderation. Thank you for participating in the discussion.

    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

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