Skip to content

Instantly share code, notes, and snippets.

@tjrobinson
Last active December 14, 2015 21:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tjrobinson/5151618 to your computer and use it in GitHub Desktop.
Save tjrobinson/5151618 to your computer and use it in GitHub Desktop.
Get TODOs
$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