Click here to Skip to main content
12,549,332 members (48,528 online)
Click here to Skip to main content
Add your own
alternative version


3 bookmarked

CodeIt.Right Code File Header Template For StyleCop Rules

, 10 May 2010 CPOL
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 

Paulo Morgado

Portugal - Europe's West Coast

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.

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