Mapping between FxCop Rules and .NET Design Guidelines

Is it planned to implement a mapping between FxCop Rules and the "real" MSDN .NET Design Guidelines? (Could be a table on some web page or something in the FxCop CHM).

Regards

Micha

[193 byte] By [MichaelRiffel] at [2007-12-17]
# 1
I'll take a look at the updated design guidelines, but I don't believe this information ships in it. We did have notations in the source content for the DG that noted whenever an FxCop rule existed for a specific guideline.

We don't have any plans currently to put this information in the FxCop chm. Can you describe why it would be helpful to you? Maybe we're missing a good opportunity.

http://www.amazon.com/exec/obidos/tg/detail/-/0321246756/qid=1130550099/sr=8-1/ref=pd_bbs_1/102-8995793-9178505?v=glance&s=books&n=507846

MichaelFanning-MS at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Visual Studio Code Analysis and Code Metrics...
# 2
The reason why it would be helpful is simply:
"It took me two weeks to make a rough matching".
OK, now to the background: We're developing something rather big and we're going to use VSTS as DevEnv and with that, we'll have FxCop as code analyzer. To be able to give a recommendation to the integrators/developers that will use the framework we develop, I need to give reasons to use or not to use this and that FxCop rule or build their code based on this and that part of the naming guidelines.
Some parts of the guideline can be found in the FxCop, others not but what counts? What FxCop says or what the guideline is telling. That's the question here. And the other, even more important question is, what guideline rules can FxCop not detect.
I'm sure I'm not alone with these problems.
MichaelRiffel at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Visual Studio Code Analysis and Code Metrics...
# 3
Does anyone else find it bizarre that the latest design guidelines are available as a book rather than on MSDN? I appreciate that the authors want to be paid for their hard work, but this info is surely important enough to be included in MSDN.

An example from the latest MSDN for Visual Studio 2005 which contradicts FxCop rules:

"If you are designing an application that needs to create its own exceptions, derive from the ApplicationException class."

JocularJoe at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Visual Studio Code Analysis and Code Metrics...
# 4
As Joe mentions, the version of the DG on MSDN is extremely out-of-date. I will chase down whether we plan to publish the new guidelines here. The book version of the guidelines is current (and does not suffer from the contradictions you and Joe refer to).

Generally speaking, you should always run the Design and Naming rules. This is where we place content derived directly from the MS DG. Because we update FxCop more frequently than the DG, you can count on FxCop delivering the most recent and accurate thinking.

I'll post more re: this general subject soon.

MichaelFanning-MS at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Visual Studio Code Analysis and Code Metrics...
# 5

Thanks for your comments.. and I totally agree, we need to push this content on the design guidelines out widely.. as you likely know I publish the content regularly on my blog (http://blogs.msdn.com/brada) and we did update the Design Guidelines docs on MSDN slightly with this content and we expect to update it even more as the UE team gets more cycles. Please keep giving us feedback on this! Oh, and BTW, Krys and I did the book as part of our jobs here at MS, so no royalties for us.. consider the book itself to be a community service.

BradA-MSFT at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Visual Studio Code Analysis and Code Metrics...
# 6
> ... we need to push this content on the design guidelines out widely

Pushing content out more widely via blogs etc is a great way to communicate how thinking on the guidelines is evolving.

But really there needs to be a single authoritative source for the current "official" guidelines, and I think someone who has paid $10000+ for MSDN Premium with Team Suite should reasonably be able to expect the design guidelines for the integrated code analysis tool he has purchased to be included in the package, without the need to go out and buy a paper book.

JocularJoe at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Visual Studio Code Analysis and Code Metrics...
# 7
We entirely agree. Our documentation folks will be updating MSDN as soon as possible with this information.
MichaelFanning-MS at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Visual Studio Code Analysis and Code Metrics...
# 8
I've often thought it would be nice to have links from each topic in the MSDN Library to an online page of annotations. The annotations could be updated by Microsoft bloggers and possibly some MVPs, and would be a good way to consolidate information which is currently communicated informally via blogs such as Brad Abrams' and FAQs on the FxCop forum. I've recorded this suggestion in the MSDN Product Feedback center:

http://lab.msdn.microsoft.com/ProductFeedback/viewfeedback.aspx?feedbackid=1ecbfb17-a702-4370-a3ff-3d4b99152428

JocularJoe at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Visual Studio Code Analysis and Code Metrics...
# 9
I think this is a great idea. On the FxCop side, we've discussed the possibility of creating an open wiki for the rule docs that would be initially populated with the standard rule topic content. I'll make sure this idea doesn't get lost. Once we ship Team Foundation and settle into our next development cycle would be a good time to think about getting this off the ground.
MichaelFanning-MS at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Visual Studio Code Analysis and Code Metrics...
# 10

I like that idea, too!

BTW: We're using VSTS RC1 as IDE recommendation. There's an integrated FxCop. But what version is it? And why can't I find some help about the Rules SDK? Is there some documentation available?

MichaelRiffel at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Visual Studio Code Analysis and Code Metrics...
# 11
The version is identical to the standalone release, with the caveat that there is some difference in the rule set. The spelling rules are missing from VS and VS contains a new assembly for Maintainability rules that don't ship in the standalone.

Custom rules development is an officially unsupported scenario, see the FAQ in this forum. Rules development will certainly be supported in the next VS release.

MichaelFanning-MS at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Visual Studio Code Analysis and Code Metrics...
# 12

Ola... "Next release" is VSTS or someting later than Whidbey?

MichaelRiffel at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Visual Studio Code Analysis and Code Metrics...
# 13
Something later than Whidbey, due to the significant changes req'd.
MichaelFanning-MS at 2007-9-9 > top of Msdn Tech,Visual Studio Team System,Visual Studio Code Analysis and Code Metrics...

Visual Studio Team System

Site Classified