Created
November 24, 2011 17:45
-
-
Save vermorel/1391893 to your computer and use it in GitHub Desktop.
measure-loc, PowerShell function, Recurse directories and compute the number of C# lines
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Measure-Loc | |
# By Joannes Vermorel, 2010 | |
# Recurse directories and compute the number of C# lines | |
# Usage: measure-loc | |
function Measure-Loc | |
{ | |
param( | |
) | |
begin | |
{ | |
} | |
process | |
{ | |
ls -recurse -filter *.cs | gc | ? { $_.Trim().Length -gt 1 } | measure-object -line | |
} | |
end | |
{ | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment