FxCop backlogs: Some rules for rule activation

If you’ve decided to try to tackle an FxCop violation backlog, one of the first issues you’re going to face is deciding which rules to activate when. Here are some general guidelines… Starting out When you first begin the backlog clean-up process, you’re going to need to introduce the FxCop tool to your team (assuming, of course, that you’re not already using FxCop for new projects). In order to focus on mastering the tool and the cleanup process before diving into “difficult” rules, you’ll want to pick a few rules to activate that meet the following criteria: The rule itself … Continue reading FxCop backlogs: Some rules for rule activation

Control flow engine, 200?-2007, RIP

Surprise! (not the good kind) If you use FxCop or Visual Studio Static Analysis and haven’t yet started playing with Orcas, you may be in for a bit of an unpleasant surprise. While the code analysis team is doing all sorts of interesting things for Orcas, one somewhat less desirable change you probably haven’t heard about yet is removal of the control flow engine and, consequently, the following rules which depend upon it: Category Rule Design ValidateArgumentsOfPublicMethods Globalization DoNotPassLiteralsAsLocalizedParameters Performance AvoidUnnecessaryStringCreation DoNotCallPropertiesThatCloneValuesInLoops DoNotConcatenateStringsInsideLoops Reliability DisposeObjectsBeforeLosingScope Security ReviewSqlQueriesForSecurityVulnerabilities Usage AttributeStringLiteralsShouldParseCorrectly DisposeMethodsShouldCallBaseClassDispose DoNotDisposeObjectsMultipleTimes LiteralsShouldBeSpelledCorrectly ProvideCorrectArgumentsToFormattingMethods The reasons given for removing the engine … Continue reading Control flow engine, 200?-2007, RIP

FxCop and the big, bad backlog

A few months ago, I gave a presentation on using FxCop at the Montreal Visual Studio Users Group. The material was divided into two main topics: (a) the mechanics of using FxCop and (b) integrating FxCop use into a development process. During the first part of the talk, some members of the peanut gallery kept piping up with questions about what one can do to handle the huge number of FxCop rule violations that an existing code base will have when one first runs FxCop against it. Lucky for me, most of the second part of the talk covered exactly … Continue reading FxCop and the big, bad backlog

No rules in your FxCop rule assembly?

Since I posted an FxCop rule sample over at bordecal.mvps.org, it’s rapidly become the most popular content on the site. Not something I expected but, given that I have trouble coming up with blogging topics and there seems to be some interest in FxCop, I figured I might as well spend a lovely Saturday morning writing about it… (Actually, I’m pretty much just killing time while waiting for a tire change, so please feel free to keep that “get a life” comment to yourself. <g>) There’s all sorts of stuff I could (and will try to) write about FxCop use, … Continue reading No rules in your FxCop rule assembly?