Click here to Skip to main content
13,447,006 members (43,467 online)
Click here to Skip to main content
Add your own
alternative version


3 bookmarked
Posted 13 Apr 2010

CodeIt.Right Code File Header Template For StyleCop Rules

, 10 May 2010
Rate this:
Please Sign up or sign in to vote.
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
<#@ 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>


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


About the Author

Paulo Morgado
Software Developer (Senior) Paulo Morgado
Portugal Portugal

You may also be interested in...


Comments and Discussions

GeneralMy vote of 5 Pin
codeziwei30-Oct-12 1:37
membercodeziwei30-Oct-12 1:37 
GeneralRe: My vote of 5 Pin
Paulo Morgado30-Oct-12 13:08
memberPaulo 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.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.180318.2 | Last Updated 10 May 2010
Article Copyright 2010 by Paulo Morgado
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid