Navigation:  StyleCop 4.3 > StyleCop 4.3 Rules > Documentation Rules >

SA1634: FileHeaderMustShowCopyright

Previous pageReturn to chapter overviewNext page
StyleCop 4.3

Send comments on this topic.

SA1634: FileHeaderMustShowCopyright

Glossary Item Box

TypeName
FileHeaderMustShowCopyright

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 file header which does not contain a copyright tag</Tag>

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

 

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

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

// <copyright file="Widget.cs" company="Sprocket Enterprises">

//     Copyright (c) Sprocket Enterprises. All rights reserved.

// </copyright>

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

 

How to Fix Violations

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

 


© Microsoft Corporation. All Rights Reserved.