Browse by Tags

Tagged Content List
  • Blog Post: Fun with Code Analysis Rule Sets

    Two weeks ago, I introduced you to Visual Studio 2010 September '08 CTP (Community Technology Preview). This CTP is available as a Virtual PC (VPC) image which can be downloaded at http://go.microsoft.com/fwlink/?LinkId=129231 . The goal of the Community Technology Preview is to obtain feedback from...
  • Blog Post: Tutorial on writing your own Code Analysis rule

    Jason Kresowaty has posted a great tutorial on writing Code Analysis/FxCop rules . He also spends time on explaining parts of the Introspection API, including the different nodes and their relationship to each other. It's a great read, even if you've written some Code Analysis rules before. Definitely...
  • Blog Post: What kind of custom rules do you want to write?

    Our excellent program manager, Joe Rohde, is trying to gather information on the kinds of custom rules customers want to write. I am a program manager for our Code Analysis system. I want to know what kind of custom rules you would like to write. Ignore what you may or may not know about what's...
  • Blog Post: FAQ: How do I debug a custom rule?

    While writing your custom rule, you will likely come across a need to debug it and work out why it's behaving in a particular manner. Debugging within FxCop Debugging a custom rule within the FxCop UI is actually quite easy. To do so, simply: Open the FxCop project that contains your custom...
  • Blog Post: Dealing with a Code Analysis backlog?

    Nicole Calinoiu has started a (what I hope to be long) series on introducing Code Analysis (FxCop in particular) to your team. Her first couple of posts are absolute rippers , check them out: FxCop and the big, bad backlog FxCop backlogs: Some rules for rule activation She's also written some...
  • Blog Post: FAQ: How do I get the SourceContext for a local?

    I want to fire on the naming of a local, however, whenever I pass the local to the Problem constructor, the source information for the method is always used. How do I get FxCop/Code Analysis to use the source information for the local instead? Because the declaration of a local is not associated with...
  • Blog Post: Framework for intergrated FxCop rule testing

    Roy Osherove has put together a Framework for testing FxCop rules . It's an interesting approach, firing up the FxCop engine for each rule that he wants to test. There are few things that I would like to see it support: The ability to specify positive tests (code that rules should not fire when...
  • Blog Post: FAQ: When looking at the names of locals in a custom rule, why do I see strange names such as 'CS$1$0000' and 'VB$1$0000'?

    Previously we showed you how to access the locals or variables of a method. Once you started to run your rule over an assembly, you might start to notice strange locals with names that start with 'CS$' and 'VB$'. These are compiler generated locals that are outside the control of the user. If you...
  • Blog Post: Free sample book chapter on Managed Code Analysis

    SearchVB.com is offering a free sample chapter on Managed Code Analysis from the book Professional Visual Studio Team System (co-written by fellow Team System colleague Noah Coad ). Chapter 8, Managed Code Analysis, focuses on how to use Team System's Static Code Analysis tool for C# or VB.NET...
  • Blog Post: FAQ: Can I create custom rules that target both Visual Studio and FxCop? [David Kean]

    I have users using both Visual Studio and FxCop, and I want to create custom rules that run on both. Is this possible? Although in the future we do plan on making it easier to move custom rules between Visual Studio and FxCop, currently you must recompile each rule assembly against the version of...
  • Blog Post: FAQ: How do I access the locals of a method in a custom rule? [Michael Fanning, David Kean]

    Note: The custom rules API is likely to change in the next version of FxCop/Visual Studio. Currently, the locals of a method are stored in a pseudo-instruction in the method's InstructionList. We plan to change this in a future version of the tool and the locals will directly hang off the method....
  • Blog Post: FAQ: How do I integrate custom rules with Visual Studio? [David Kean]

    Update: To have rules target both Visual Studio and FxCop, see the following entry: FAQ: Can I create custom rules that target both Visual Studio and FxCop? Although not officially supported or documented, the Managed Code Analysis (FxCop) feature available with Visual Studio Team System comes...
  • Blog Post: Simplified FxCop Rules SDK [Michael Fanning]

    As mentioned previously here and elsewhere, we're planning to improve and simplify several aspects of FxCop's extensibility model. This is the first of a series of threads about those improvements, in order to solicit feedback and give custom rules developers a heads up on the coming changes. Here's...
  • Blog Post: FxCop 1.30 and creating custom rules using Introspection Engine [Michael Murray]

    As John MacKenzie pointed out on the GotDotNet FxCop message board , John Robbins has a great article in the June issue of MSDN magazine on FxCop 1.30 and custom rules using the new Introspection engine. Check it out at http://msdn.microsoft.com/msdnmag/issues/04/06/Bugslayer/default.aspx .
  • Blog Post: Writing Custom Rules in FxCop & FxCop Visual Studio Integration [Jeffrey van Gogh]

    Two common questions we often get are: Can I write my own rules for FxCop and customize existing rules? Can I integrate FxCop into visual studio and can I jump to the location in my source of the item that FxCop flags as an error? That's why I want to give some more information on both: ...
Page 1 of 1 (15 items)