VS/TFS 2010 StyleCop 4.4 Checkin Policy?

Jul 7, 2010 at 3:51 PM

I downloaded version 4.4 from http://stylecop.codeplex.com/releases/view/44839 and I'm wondering how I can set a checkin policy for VS 2010. I see that the current StyleCop checkin policy only goes to 4.3.2.1. Will there be a new checkin policy available for 4.4?

Jul 7, 2010 at 9:46 PM

Which TFS checkin policy are you referring to? We have not released an "official" one.

Jul 8, 2010 at 2:44 PM

Microsoft released this one I thought: http://code.msdn.microsoft.com/StyleCopPolicy. Is this somehow different?

Jul 8, 2010 at 4:20 PM
Edited Jul 8, 2010 at 4:23 PM

That policy isn't owned by Microsoft. It's written by Eugene Zakhareyev who hosts it on his blog. There's another policy hosted on CodePlex I wrote for the 4.3.3.0 release of StyleCop at http://sourceanalysispolicy.codeplex.com

Edit: I'm still trying to work out the kinks of compiling the policy for 2008 and 2010 from the same code base. The installation package only supports VS 2008, but you can change the assembly bindings for devenv.exe in 2010 and add the registry value to get it to work there as well.

Jul 8, 2010 at 9:56 PM
Jeff. Interesting I thought code.msdn could only be uploaded to by Microsoft employees. I shouldn't try to figure out why then we have code.msdn and codeplex but whatever. If you've got some early steps for how to get this to work in 2010 I'd be happy to work it out further and put together a nice document/how to guide. Thanks, Allen
Jul 9, 2010 at 2:58 AM
Edited Jul 9, 2010 at 3:04 AM

I got permission to update the policy during work tomorrow since we use it there as well. We've been having some problems with the temporary fix I came up with to get the current policy to work with VS 2010, so I wouldn't suggest trying it. Keep an eye on the project for the next couple days for updates.

I'd also like to send out a special thanks to Jason for moving from the MSDN site to CodePlex and making it completely open source.

Edit: I wanted to add that I don't plan on adding support for release candidates. It's just too much work to do for small changes between versions of StyleCop, so expect the updated policy to use 4.3 until 4.4 gets released.

Jul 9, 2010 at 1:32 PM

Awesome. Can't wait to see your efforts be fruitful.

Jason any idea on the timeline for RTM of 4.4? I ask because we're in the process of migrating to TFS 2010/VS 2010 and one of the biggest tools we use for our SDLC processes is the StyleCop checkin policy.

I'll keep an eye out for updates here on codeplex! 

Jul 10, 2010 at 12:44 AM

Well, it took a bit more effort than I expected but I got the 1.2 RC of the policy released. I did bind it to the StyleCop 4.4.0 Release Candidate, so you can start using it immediately on VS 2008 or 2010.