Click here to Skip to main content
15,881,559 members
Articles / All Topics

CodeIt.Right Code File Header Template For StyleCop Rules

Rate me:
Please Sign up or sign in to vote.
5.00/5 (2 votes)
10 May 2010CPOL 17.4K   3   2
CodeIt.Right Code File Header Template For StyleCop Rules

I like to use both StyleCop and CodeIt.Right to validate my code – StyleCop because it’s free and CodeIt.Right because it’s really good.

While StyleCop provides only validation, CodeIt.Right provides both validation and correction of violations.

Unfortunately, CodeIt.Right’s supplied template for code file headers does not conform to StyleCop rules.

Fortunately, CodeIt.Right allows us to define our own template. Here’s the one I use:

free hit counters
C#
<#@ template language="C#" #>
//-----------------------------------------------------------------------
// <copyright file="<#= System.IO.Path.GetFileName(Context.DestinationFile) #>"
//            project="<#= Context.ProjectName #>"
//            assembly="<#= Context.AssemblyName #>"
//            solution="<#= Context.SolutionName #>"
//            company="<#= Context.GetGlobalProperty("CompanyName") #>">
//     Copyright (c) <#= Context.GetGlobalProperty("CompanyName") #>. All rights reserved.
// </copyright>
// <author id="<#= Context.GetGlobalProperty("UserID") #>">
// <#= Context.GetGlobalProperty("UserName") #></author>
// <summary></summary>
//-----------------------------------------------------------------------

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior) Paulo Morgado
Portugal Portugal

Comments and Discussions

 
GeneralMy vote of 5 Pin
codeziwei30-Oct-12 1:37
codeziwei30-Oct-12 1:37 
GeneralRe: My vote of 5 Pin
Paulo Morgado30-Oct-12 13:08
professionalPaulo Morgado30-Oct-12 13:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.