Update: StyleCop for ReSharper is now feature complete.
While I was on holiday Microsoft released a new version of Microsoft Source Analysis for C#, in the new version - 4.3 - it has been re-branded to it's original internal Microsoft name - StyleCop. There was a bit of a backlash against the initial release of Source Analysis - a few members of the community were warned that the existing Terms and Conditions of Source Analysis for C# did not allow reverse engineering thus any custom rules or modifications. Thankfully Brian Harry (Visual Studio Team System Guru) stepped in and cleared up the confusion; which has lead to the release of an Official StyleCop 4.3 SDK - which now allows the community to extend and integrate StyleCop, without reverse engineering the assemblies. Thankfully it looks as though Jason Allor ran StyleCop against the StyleCop source code as the documentation provided in the SDK is extensive and complete!
So even though I promised myself I wouldn't do any coding while on holiday - one wet evening in Cape Town lead to me opening up my laptop and checking my RSS feeds only to discover that the StyleCop SDK had been released. I decided to re-write my prototype following the new information available in the SDK. The results can now be found on CodePlex under a new project called "StyleCop for ReSharper". Both the Source and MSI Installer are available.
Here's the initial blurb from the CodePlex page:
The Plug-in is a custom hosting environment for StyleCop which is invoked by ReSharper's IDaemonStage, IDaemonStageProcess interfaces. The StyleCop engine can, at this time, only process files rather than file contents, this leads to a particular problem when trying to achieve real-time syntax highlighting - that is, unless you constantly save the file, the contents of the code file within the IDE will become out of sync with the version on the File System that the StyleCop engine will process.
In the current version of the plug-in, a shadow copy of the current source file is created in the current users temporary files area. This shadow copy is over-written with changes as they are made. The StyleCop engine analyses this shadow copy and any resulting violations are displayed in the IDE.
The Plug-in also implements a scavenging algorithm to clean up the shadow copies to ensure that no space is wasted.
This version of the Plug-in also tries to find and use the Settings.STYLECOP file of the project currently being analysed, this allows the plugin to display violations only of the rules you have enabled. This search algorithm is quite rudimentary and can easily be updated to be made a little more robust.
I hope you find the plug-in useful.