4

Closed

Insert/Update C# File Header & Copyright

description

I have :
JetBrains ReSharper 7.1.1 Full Edition
Build 7.1.1000.900 on 2012-12-13T22:22:48
Licensed to: xxx xxx xxx
Plugins: 1
  1. “StyleCop (4.7.44.0)” v4.7.1000.0
    Visual Studio 11.0.51106.1.
I want to use R# Code Cleanup to insert a file header into C# files that do not already have headers. My Settings.StyleCop file has valid company name, and copyright text.

For the R# options, Code Cleanup, I see two settings that seem to work together to do this:
-the checkbox for C# “Update file header”,
-and the dropdown in StyleCop Documentation “1633-1641: Update file header”

Manipulating those settings to these configurations gives these results.

For StyleCop setting: Do Not Change:
-C# setting: Clear. [Does not change text. Does not add if header is missing]
-C# setting: Checked [Deletes existing header, does not add if header is missing]

For StyleCop setting: Insert if missing:
-C# setting: Clear [Reformats existing by adding extra comment marks, but does not change text. Adds without extra comment marks if missing]
-C# setting: Checked [Replaces existing header with StyleCop text, adding it if it was missing]

Is this a bug or do I misunderstand something?
Closed Dec 1, 2016 at 5:06 AM by csdahlberg
Closing this work item due to its age and because development is moving to GitHub. Please open a new issue at https://github.com/StyleCop/StyleCop.ReSharper if this still needs to be addressed.

comments