<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Enforcing Code Styles with ReSharper and StyleCop</title>
	<atom:link href="http://robertbeal.com/47/enforcing-code-styles-with-resharper-and-stylecop/feed" rel="self" type="application/rss+xml" />
	<link>http://robertbeal.com/47/enforcing-code-styles-with-resharper-and-stylecop</link>
	<description>A blog about programming (Ruby/C#), Linux, bicycle touring and travel.</description>
	<lastBuildDate>Tue, 31 Jan 2012 11:39:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Robert</title>
		<link>http://robertbeal.com/47/enforcing-code-styles-with-resharper-and-stylecop/comment-page-1#comment-905</link>
		<dc:creator>Robert</dc:creator>
		<pubDate>Tue, 28 Jul 2009 13:51:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertbeal.info/?p=47#comment-905</guid>
		<description>Hi Murf, 
 
&quot;stylecop.violations&quot; should be generated by StyleCop itself. It should output two files, &quot;stylecop.xml&quot; and &quot;stylecop.violations.xml&quot; from what I can remember. 
 
The easiest way to debug this, is comment out all of the NAnt code regarding the number of violations. Just get StyleCop executing.  
 
Once you&#039;ve got that working, go to the StyleCop output directory you specified. This should be the variable {report.directory}. It looks like you have it set to D:. Check you have two xml files output there. 
 
Alternatively you could use &quot;stylecop.xml&quot; I think, but you&#039;d need to change the XSLT I&#039;ve provided (for counting the violations) as the Schema may differ. 
 
Hope that helps. </description>
		<content:encoded><![CDATA[<p>Hi Murf,</p>
<p>&quot;stylecop.violations&quot; should be generated by StyleCop itself. It should output two files, &quot;stylecop.xml&quot; and &quot;stylecop.violations.xml&quot; from what I can remember.</p>
<p>The easiest way to debug this, is comment out all of the NAnt code regarding the number of violations. Just get StyleCop executing. </p>
<p>Once you&#039;ve got that working, go to the StyleCop output directory you specified. This should be the variable {report.directory}. It looks like you have it set to D:. Check you have two xml files output there.</p>
<p>Alternatively you could use &quot;stylecop.xml&quot; I think, but you&#039;d need to change the XSLT I&#039;ve provided (for counting the violations) as the Schema may differ.</p>
<p>Hope that helps.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Murf</title>
		<link>http://robertbeal.com/47/enforcing-code-styles-with-resharper-and-stylecop/comment-page-1#comment-904</link>
		<dc:creator>Murf</dc:creator>
		<pubDate>Tue, 28 Jul 2009 13:20:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertbeal.info/?p=47#comment-904</guid>
		<description>Hi Robert, 
 
SORRY PREVIOUS POST HAD ERRORS 
 
I have the following error:- 
 
Unable to find source XML file &#039;D:stylecop.violations.xml&#039;. 
 
How is the stylecop.violations.xml file generated? 
 
Should the command be changed from  
 
09. arg line=&quot;-of ${report.directory}stylecop.xml&quot;  
 
to  
 
09. arg line=&quot;-of ${report.directory}stylecop.violation.xml&quot; 
 
If not how is stylecop.violations.xml generated?  
 
Thanks! </description>
		<content:encoded><![CDATA[<p>Hi Robert,</p>
<p>SORRY PREVIOUS POST HAD ERRORS</p>
<p>I have the following error:-</p>
<p>Unable to find source XML file &#039;D:stylecop.violations.xml&#039;.</p>
<p>How is the stylecop.violations.xml file generated?</p>
<p>Should the command be changed from </p>
<p>09. arg line=&quot;-of ${report.directory}stylecop.xml&quot; </p>
<p>to </p>
<p>09. arg line=&quot;-of ${report.directory}stylecop.violation.xml&quot;</p>
<p>If not how is stylecop.violations.xml generated? </p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Murf</title>
		<link>http://robertbeal.com/47/enforcing-code-styles-with-resharper-and-stylecop/comment-page-1#comment-903</link>
		<dc:creator>Murf</dc:creator>
		<pubDate>Tue, 28 Jul 2009 13:18:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertbeal.info/?p=47#comment-903</guid>
		<description>Hi Robert, 
 
I have the following error:- 
 
Unable to find source XML file &#039;D:stylecop.violations.xml&#039;. 
 
How id the stylevcop.violations file generated? 
 
Should the command be changed from  
 
09. 
 
to  
 
09. 
 
If not how is stylecop.violations.xml generated?  
 
Thanks! </description>
		<content:encoded><![CDATA[<p>Hi Robert,</p>
<p>I have the following error:-</p>
<p>Unable to find source XML file &#039;D:stylecop.violations.xml&#039;.</p>
<p>How id the stylevcop.violations file generated?</p>
<p>Should the command be changed from </p>
<p>09.</p>
<p>to </p>
<p>09.</p>
<p>If not how is stylecop.violations.xml generated? </p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert</title>
		<link>http://robertbeal.com/47/enforcing-code-styles-with-resharper-and-stylecop/comment-page-1#comment-898</link>
		<dc:creator>Robert</dc:creator>
		<pubDate>Mon, 06 Jul 2009 13:34:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertbeal.info/?p=47#comment-898</guid>
		<description>Ah, this is something I&#039;ve not got round to doing. 
 
If you look at the above snippets, you&#039;ll notice when &quot;exec&quot;ing StyleCop I specify an output directory for the report, &quot;stylecop.xml&quot;. StyleCop will also generate a &quot;stylecop.violations.xml file. 
 
Now, using CruiseControl you should be able to write a template to display the data using XSL. 
 
If you look in the directory where you installed CruiseControl.Net, you should notice a &quot;webdashboard&quot; folder. Inside that are all the templates, and XSLT&#039;s for transforming the XML data. 
 
You need to: 
 
1) Open up dashboard.config, look at the bottom, there should be an example of integrating additional reports into CruiseControl.Net. You&#039;ll have to have a play around with it. 
 
2) Either write an XSL yourself to transform &quot;stylecop.violations.xml&quot; or download one (google around, I&#039;m sure someone has written one). 
 
I&#039;d strongly recommend putting CruiseControl, namely the webdashboard and any .configs into source control. </description>
		<content:encoded><![CDATA[<p>Ah, this is something I&#039;ve not got round to doing.</p>
<p>If you look at the above snippets, you&#039;ll notice when &quot;exec&quot;ing StyleCop I specify an output directory for the report, &quot;stylecop.xml&quot;. StyleCop will also generate a &quot;stylecop.violations.xml file.</p>
<p>Now, using CruiseControl you should be able to write a template to display the data using XSL.</p>
<p>If you look in the directory where you installed CruiseControl.Net, you should notice a &quot;webdashboard&quot; folder. Inside that are all the templates, and XSLT&#039;s for transforming the XML data.</p>
<p>You need to:</p>
<p>1) Open up dashboard.config, look at the bottom, there should be an example of integrating additional reports into CruiseControl.Net. You&#039;ll have to have a play around with it.</p>
<p>2) Either write an XSL yourself to transform &quot;stylecop.violations.xml&quot; or download one (google around, I&#039;m sure someone has written one).</p>
<p>I&#039;d strongly recommend putting CruiseControl, namely the webdashboard and any .configs into source control.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Liam</title>
		<link>http://robertbeal.com/47/enforcing-code-styles-with-resharper-and-stylecop/comment-page-1#comment-897</link>
		<dc:creator>Liam</dc:creator>
		<pubDate>Mon, 06 Jul 2009 12:27:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertbeal.info/?p=47#comment-897</guid>
		<description>Can you give advise on how to setup the CruiseControl dashboard to incorporate the output generated by StyleCopCmd. Many Thanks!! </description>
		<content:encoded><![CDATA[<p>Can you give advise on how to setup the CruiseControl dashboard to incorporate the output generated by StyleCopCmd. Many Thanks!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert</title>
		<link>http://robertbeal.com/47/enforcing-code-styles-with-resharper-and-stylecop/comment-page-1#comment-841</link>
		<dc:creator>Robert</dc:creator>
		<pubDate>Thu, 16 Apr 2009 17:44:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertbeal.info/?p=47#comment-841</guid>
		<description>@rajesh 
 
1) The .resharper settings file is purely for ReSharper. It&#039;s what gets loaded with Visual Studio. You set this up to stop ReSharper writing messy, style-violating code. 
 
2) UserSetting.xml is also related to ReSharper. It contains a user&#039;s specific settings, namely the &quot;Code CleanUp&quot; settings. These setting contain some StyleCop settings (ie how to clean up violations). 
 
3) The Setting.StyleCop file is what the StyleCopForReSharper plugin reads. So whatever you have in there will match in Visual Studio, or if you ran StyleCop via commandline. 
 
So far it matches virtually 95%. There are some odd cases, but on the whole it works virtually perfectly. It&#039;s just a matter of tweaking your StyleCop.Settings file, and .resharper settings file so that they work in harmony. 
 
We have thousands of violations in our code, so even if it did only work 95% of the time, it still reduces the number of violations hugely each week. 
 
The main trick is to enforce is as part of your continuous integration build. I&#039;ve mentioned the troubles between comparing results on your local pc, to the build server towards the end of the article. It&#039;s something I want to fix in future. </description>
		<content:encoded><![CDATA[<p>@rajesh</p>
<p>1) The .resharper settings file is purely for ReSharper. It&#039;s what gets loaded with Visual Studio. You set this up to stop ReSharper writing messy, style-violating code.</p>
<p>2) UserSetting.xml is also related to ReSharper. It contains a user&#039;s specific settings, namely the &quot;Code CleanUp&quot; settings. These setting contain some StyleCop settings (ie how to clean up violations).</p>
<p>3) The Setting.StyleCop file is what the StyleCopForReSharper plugin reads. So whatever you have in there will match in Visual Studio, or if you ran StyleCop via commandline.</p>
<p>So far it matches virtually 95%. There are some odd cases, but on the whole it works virtually perfectly. It&#039;s just a matter of tweaking your StyleCop.Settings file, and .resharper settings file so that they work in harmony.</p>
<p>We have thousands of violations in our code, so even if it did only work 95% of the time, it still reduces the number of violations hugely each week.</p>
<p>The main trick is to enforce is as part of your continuous integration build. I&#039;ve mentioned the troubles between comparing results on your local pc, to the build server towards the end of the article. It&#039;s something I want to fix in future.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rajesh</title>
		<link>http://robertbeal.com/47/enforcing-code-styles-with-resharper-and-stylecop/comment-page-1#comment-840</link>
		<dc:creator>rajesh</dc:creator>
		<pubDate>Thu, 16 Apr 2009 15:17:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.robertbeal.info/?p=47#comment-840</guid>
		<description>Nice article.  
 
I have few questions: 
 
1. Does the Settings.StyleCop file matches exactly with resharper settings file? 
2. Does the Enforcing results from StyleCop and  resharper matches 100%. 
 
The reason is, I want to make sure that the results on build server (using StyleCop) and on developer machine using resharper are the same. 
 
Thanks 
Rajesh </description>
		<content:encoded><![CDATA[<p>Nice article. </p>
<p>I have few questions:</p>
<p>1. Does the Settings.StyleCop file matches exactly with resharper settings file?</p>
<p>2. Does the Enforcing results from StyleCop and  resharper matches 100%.</p>
<p>The reason is, I want to make sure that the results on build server (using StyleCop) and on developer machine using resharper are the same.</p>
<p>Thanks</p>
<p>Rajesh</p>
]]></content:encoded>
	</item>
</channel>
</rss>

