Skip to content

Latest commit

 

History

History
56 lines (43 loc) · 1.48 KB

SA1635.md

File metadata and controls

56 lines (43 loc) · 1.48 KB

SA1635

TypeName SA1635FileHeaderMustHaveCopyrightText
CheckId SA1635
Category Documentation Rules

Cause

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

Rule description

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

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

A file header should include copyright text, 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 your company's standard copyright text to the copyright tag.

How to suppress violations

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