SA1636: FileHeaderCopyrightTextMustMatch

StyleCop

TypeName

FileHeaderCopyrightTextMustMatch

CheckId

SA1636

Category

Documentation Rules

Cause

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

Rule Description

A violation of this rule occurs when the file header at the top of a C# file does not contain the copyright text that has been specified for the project. To enable this rule, navigate to the StyleCop settings for the project and change to the Company Information tab, as shown below:

Check the checkbox at the top of the settings page, and fill in the required copyright text for your company. Click OK to save the settings. With these settings in place, every file within the project must contain the required copyright text within its file header copyright tag, as shown in the example below:

//-----------------------------------------------------------------------

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

//     Custom company copyright tag.

// </copyright>

//-----------------------------------------------------------------------

How to Fix Violations

To fix a violation of this rule, add your company’s standard copyright text to the file header copyright tag.