-
Notifications
You must be signed in to change notification settings - Fork 23
SA1638
TypeName |
FileHeaderFileNameDocumentationMustMatchFileName |
CheckId |
SA1638 |
Category |
Documentation Rules |
The file tag within the file header at the top of a C# code file does not contain the name of the file.
A violation of this rule occurs when the file tag within the file header at the top of a C# file does not contain the name of the file. For example, consider a C# source file named File1.cs, with the following header:
//-----------------------------------------------------------------------
// <copyright file="File2.cs" company="My Company">
// Custom company copyright tag.
// </copyright>
//-----------------------------------------------------------------------
A violation of this rule would occur, since the file tag does not contain the correct name of the file. The header should be written as:
//-----------------------------------------------------------------------
// <copyright file="File1.cs" company="My Company">
// Custom company copyright tag.
// </copyright>
//-----------------------------------------------------------------------
To fix a violation of this rule, add the name of the file to the file tag.
[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1638:FileHeaderFileNameDocumentationMustMatchFileName", Justification = "Reviewed.")]
- - SA0102 - Clean Install
- - Download
- - Documentation Rules - Layout Rules - Maintainability Rules - Naming Rules - Ordering Rules - Readability Rules - Spacing Rules - Suppressions
- - Adding a custom StyleCop settings page - Adding custom rule settings - Authoring a custom styleCop rule - Authoring rules metadata - Custom CSharp Language Service - Custom MSBuild Integration - Hosting StyleCop in a Custom Environment - Installing a Custom Rule - Integrating StyleCop Into Build Environments - Integrating StyleCop into MSBuild - Writing Custom Rules for StyleCop