Preview of StyleCop for ReSharper 5.1.14872.000 Available
This is a quite big release as it contains a feature that the development team have been craving since the plugin’s inception.
When the StyleCop API was made public – to allow the community to build extensions and plugins – the first thing I did was to figure out how I could get StyleCop to run with every keystroke and translate this into ReSharper Highlighting info which would automatically display the location of any StyleCop violation – as my vision was to create a plugin that would give developers a MS Word Grammar / Spell Checker experience for Coding Standards violations.
StyleCop works by analysing a physical code file. If you run StyleCop from the Visual Studio context menu – it will save your current file and then read the contents and analyse it. In order for StyleCop for ReSharper to work on every keystroke – I had to add the ability for ReSharper to create a clone of the current file, in a temporary location and then get StyleCop to analyze it.
The main problem has been that with every keystroke in Visual Studio there is a small IO performance hit as this temporary file is written and then StyleCop performs another IO hit to read the file before analysis.
It was always our dream to be able to pass StyleCop a string representation of the the current file – to remove the IO performance hits. It’s taken several months and lots of hard work by Andy Reeves to implement an in memory analyzer feature for the now Open Source StyleCop project – which then allows StyleCop for ReSharper to pass in a string representation of the current document.
The performance improvement is quite staggering – violation highlighting is instant and any sense of lag is totally removed.
I really hope you enjoy this release – after almost 2 years we’re finally at the place I envisaged when I first set out to create this product.
The new release of StyleCop for ReSharper is available on CodePlex.
About this entry
You’re currently reading “Preview of StyleCop for ReSharper 5.1.14872.000 Available,” an entry on Howard van Rooijen's Blog
- Published:
- October 1, 2010 / 9:02 pm
- Category:
- StyleCop for ReSharper
- Tags:
No comments yet
Jump to comment form | comment rss [?] | trackback uri [?]