Last active
December 14, 2015 21:29
-
-
Save tjrobinson/5151618 to your computer and use it in GitHub Desktop.
Get TODOs
This file contains hidden or 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
$head = "<style> | |
body { | |
color: #151515; | |
font-family: helvetica neue,arial,sans-serif; | |
font-size: 82%; | |
line-height: 1.5em; | |
text-rendering: optimizelegibility; | |
} | |
th { | |
text-align: left; | |
} | |
</style>" | |
$unwantedPrefix = (Get-Location).Path | |
$patterns = ("\bTODO\b", "\bHACK\b", "\bWARN\b", "\bUNDONE\b") | |
Get-ChildItem -Recurse -Include *.cs | Select-String -Pattern $patterns -CaseSensitive | ConvertTo-Html Line, Path, LineNumber -Title "TODOs" -Head $head | Foreach-Object { $_.Replace("$unwantedPrefix\", "") } | Set-Content "todo.html" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment