Skip to content

Latest commit

 

History

History
55 lines (42 loc) · 1.38 KB

SA1634.md

File metadata and controls

55 lines (42 loc) · 1.38 KB

SA1634

TypeName SA1634FileHeaderMustShowCopyright
CheckId SA1634
Category Documentation Rules

Cause

The file header at the top of a C# code file is missing a copyright tag.

Rule description

A violation of this rule occurs when the file header at the top of a C# file is missing a copyright tag. For example:

//-----------------------------------------------------------------------
//<Tag>A fileheader which does not contain a copyright tag</Tag>
//-----------------------------------------------------------------------

A file header should include a copyright tag, as follows:

//-----------------------------------------------------------------------
// <copyright file="Widget.cs" company="My Company">
//     Custom company copyright tag.
// </copyright>
//-----------------------------------------------------------------------

How to fix violations

To fix a violation of this rule, add a standard copyright tag to the file header.

How to suppress violations

[SuppressMessage("StyleCop.CSharp.DocumentationRules", "SA1634:FileHeaderMustShowCopyright", Justification = "Reviewed.")]
#pragma warning disable SA1634 // FileHeaderMustShowCopyright
#pragma warning restore SA1634 // FileHeaderMustShowCopyright