Skip to content

Latest commit

 

History

History
57 lines (44 loc) · 1.5 KB

SA1640.md

File metadata and controls

57 lines (44 loc) · 1.5 KB

SA1640

TypeName SA1640FileHeaderMustHaveValidCompanyText
CheckId SA1640
Category Documentation Rules

Cause

The file header at the top of a C# code file does not contain company name text.

Rule description

A violation of this rule occurs when the file header at the top of a C# file does not contain a company tag with company name text. For example:

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

The company attribute should have text in it. For example:

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

How to fix violations

To fix a violation of this rule, add and fill-in a company attribute containing the name of the company.

How to suppress violations

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