Insert file header

Hello all,

I would like to understand "File header insertion" in Resharper. From my point of view is this behaviour bug:

  • I have defined file header this way:


-----------------------------------------------------------------------
<copyright file="$FILENAME$" company="CÍGLER SOFTWARE,a.s.">
     All rights are reserved. Reproduction or transmission in whole or
     in part, in any form or by any means, electronic, mechanical or
     otherwise, is prohibited without the prior written consent of the
     copyright owner.
</copyright>
<summary>
     Definition of the $FILENAME$ class.
</summary>
-----------------------------------------------------------------------

    • In Code Cleanup I have defined own cleanup. There is only file header update checked this way:

Code Cleanup settings.png

  • When I do this Code Cleanup file header is changed to:


// --------------------------------------------------------------------------------------------------------------------
// <copyright file="IssuedInvoiceQuery.cs" company="">
//   
// </copyright>
// --------------------------------------------------------------------------------------------------------------------



What's wrong? How to solve this?

I thought that is my misconfiguration but this behaviour is common across all our team.

Thank you for any advice.
3 comments
Comment actions Permalink

Hello Radoslav,

Could you please tell me if you use StyleCop with ReSharper?

Thank you.

0
Comment actions Permalink

Hello Alex,

yes, I'm using StyleCop in its latest version.

I have found this article:

http://blogs.jetbrains.com/dotnet/2010/12/automating-file-header-information-with-resharper/

and tomorow I'll check if this solve our troubles.

Thank you.

0
Comment actions Permalink

Hello Radoslav,

It's a known issue that StyleCop does not respect ReSharper's File Header option. Please use the StyleCop setting for File Header.
You are also welcome to ask StyleCop team about this issue on the official site here: http://stylecop.codeplex.com/.

Thank you!

0

Please sign in to leave a comment.