Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prevent code cleanup creating file headers in Resharper

I have tried all the advice I can find on stackoverflow and google, but nothing I can find will prevent the Code Cleanup option of resharper from creating headers in every file like this:

// --------------------------------------------------------------------------------------------------------------------
// <copyright file="FishBiscuits.cs" company="">
//   
// </copyright>
// <summary>
//   
// </summary>
// --------------------------------------------------------------------------------------------------------------------

I have VS2012, StyleCop and Resharper. In StyleCop I have disabled all the attributes about requiring documentation headers. In Resharper I have disabled anything that looked like it might help. When I go to code clean-up in the list of things it's going to do it has some options like 1600, 1604, 1609 as Yes but Update File Header as No.

Screenshot from Resharper

In StyleCop settings, 1600, 1609 and 1610 are unchecked, as well as all of the File Headers options.

The only thing I can think of is that these settings are changed by right clicking the project and going to Stylecop Settings, so perhaps they aren't the global settings that Resharper is reading. I can't find any way to alter a global stylecop settings file though.

Any ideas?

like image 581
NibblyPig Avatar asked Nov 18 '13 10:11

NibblyPig


1 Answers

Looks like this is down to the Update file header option in your cleanup profile, combined with whatever is in File Header Text in the ReSharper options.

If you already have a custom cleanup profile, you can just untick Update file header under the the C# section of the profiles options in the Code Cleanup section in ReSharpers options, if you are using one of the default profiles, then removing all of the text under File Header Text in ReSharpers options should stop this from happening.

You mentioned you use StyleCop, looks like you need to look for the StyleCop for ReSharper section under the ReSharper options, and untick Insert Text into documentation and file headers.

More info on JetBrain's blog.

like image 188
JMK Avatar answered Oct 26 '22 08:10

JMK