Copyright 2008-2009, Paul Jackson, all rights reserved
Update July 22, 2008: There've been some clarification and updates that make this a non-issue.
I started this blog last month with a series of posts on Microsoft Source Analyzer, or StyleCop, a new product released on Code Gallery and which can best be described as fxCop for source code. Where fxCop works on the compiled binary, StyleCop works on the source code itself. Since we’re currently reviewing our coding standards here, I jumped on this product because checking source code for naming, spacing, etc. standards is a royal pain.
The first thing I ran into was a conflict between our standards and those that ship with StyleCop. We require an underscore start the name of private fields. So, assuming that StyleCop was extensible, as fxCop is, I did a quick Google for “customizing stylecop rules” and found nothing. So I did a little digging (with Reflector) in the public interface of MSA and figured out how to do it. Since the information wasn’t already out there, I figured I now had something to contribute to the community other than long-winded discourse on the need to learn how do do Manycore programming well. And to let people know about it, I responded to posts in the StyleCop forum about custom rules.
In response, I caught some crap from the Microsoft team about violating the license agreement by using Reflector. A few of my posts were deleted. The community argued the whole license issue, because there are two license agreements involved – the Code Gallery one that pops up when you download and the StyleCop-version when you install. I don’t think anyone had a reasonable expectation when installing the product that these would be different.
In any case, the whole discussion about licensing disappeared from the forum and no more was said about it.
Then today I see this thread in the forum.
Apparently, someone wanted to integrate StyleCop with the Team Foundation Server build process. So he did a little digging with Reflector, figured out how to do it, and blogged about it. Then he responded to a forum query on how do this. Sound familiar?
Where his story differs from mine, is that he apparently had more communication with Microsoft than I did. His blog entry now reads only:
“This MSBuild task has been removed per request by Microsoft.”
Hey, Redmond! What were you thinking?
You released this product to a community of people interested in how technology works … customization and integration with other tools are critical to our work process … how could you not know we’d try to figure it out and make it work for us?
Yeah, maybe these things will start breaking with a future version of StyleCop, but the community wants them now. We’re not idiots, we know that if the API changes our stuff will break … that’s a risk we’re willing to take because we want the functionality now. We want to use the product now because it’s useful to us, but not without these features. Fine, you didn’t have time to provide them in this release … let us do it! That’s what “community” is about.
Or are you seriously suggesting that our use of Reflector somehow endangers your intellectual property. Gentlemen, if it’s truly that important to you, then I submit to you that .Net was the wrong environment to write it in.
There are a lot of smart people out here who are willing to take your work, build on it the things you didn’t have time to, and make your products more useful and better. By making things like custom rules and MSBuild tasks available now, StyleCop becomes more beneficial to more people … people who, without those things, would shrug and say, “Nice idea, but it doesn’t do what I need”, and delete the whole damn thing.