SA1649 fires for correctly named file - part 2

Mar 25, 2011 at 12:40 PM

Beyond the earlier problem with SA1649 (now fixed), I have found a further problem as in file DingbatItem.cs containing class DingbatItem:

// <copyright file="DingbatItem.cs" company="Clive Chinery">
// Copyright (c) 2011 All Right Reserved
// </copyright>

namespace StyleCopSample
{
  /// <summary>
  /// Dingbat Item
  /// </summary>
  /// <typeparam name="TClass">The generic type parameter.</typeparam>
  /// <remarks>
  /// Get Warning    4    SA1649:
  /// The file attribute in the file header's copyright tag must contain the name of the first type in the file.   
  /// </remarks>
  public class DingbatItem<TClass> : System.Web.UI.UserControl
  {
  }
}

Coordinator
Mar 25, 2011 at 12:58 PM

Hi,

Filename should be 'DingbatItem{TClass}.cs' in this case.

Mar 29, 2011 at 7:23 AM
andyr wrote:

Hi,

Filename should be 'DingbatItem{TClass}.cs' in this case.

Thank you for clarifying the rule. Would it be possible to include in the violation message some text like "Based on your class name of XXXXX, the file should be named ZZZZ.cs?

p.s. I greatly appreciate that I now do not have to de-install the previous version before installing the new version.

Apr 12, 2011 at 6:20 AM

4.5.10.0 loaded OK and checks out the source OK! 

No abnormalities detected in it when checking my code. - My congratulations to the team on a job well done!