I am using Microsoft Visual Studio 2013 Update 4
with ReSharper 9.0 Update 1
.
I have ReSharper.StyleCop (for R# 9)
(https://github.com/kubiix/ReSharper.StyleCop) ReSharper plugin installed version 4.7.50-beta3
:
Operations like removing unused usings in a file seems to execute the silent cleanup which, unconfigurably, inserts file header and documents all class members.
If I have this code:
using System;
public class Class
{
}
And choose the StyleCop option to Remove unused directives in file
the code becomes:
// --------------------------------------------------------------------------------------
// <copyright file="RunThisCode.cs" company="">
//
// </copyright>
// --------------------------------------------------------------------------------------
public class Class
{
}
The cause of the problem seems that the Code Style page of ReSharper configurations shows an Update File Header Style
entry for StyleCop which is set to Insert header if it's missing
.
Unfortunately, there seems to be no option for the moment to completely deactivate that header (e.g. by an option Do not change
).
Is there a way to overcome this problem? Or is there a way to globally disable file headers documentation in ReSharper?
I can't run the plugin so not able to verify, but reading the documentation gives the impression it is possible.
Under Managing StyleCop Project Settings, http://stylecop.codeplex.com/wikipage?title=Managing%20StyleCop%20Project%20Settings&referringTitle=Documentation, there is a "Rules tab" link, http://stylecop.codeplex.com/wikipage?title=Rules%20tab&referringTitle=Managing%20StyleCop%20Project%20Settings.
On the Rules page under "Detailed Settings" the image shows "File headers".
Also, http://www.stylecop.com/docs/SA1633.html and http://www.stylecop.com/docs/SA1634.html, show that it should be possible. I suspect that under File Headers there will be an option or two for the above codes.
That allows for project level settings, however the docs further elude to allowing global settings - http://stylecop.codeplex.com/wikipage?title=Sharing%20StyleCop%20Settings%20Across%20Projects&referringTitle=Managing%20StyleCop%20Project%20Settings
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With