I'd like to hook this so I remember to remove it if I don't wind up using it or needing it. Resharper won't pick it up because it's javascript. Even the VS2008 task list won't scrape it out of the comments.
My thoughts were either a //TODO:
or #warning
directive, but so far I can't find anything that works and gives no errors.
Sample attempt:
<script type="text/javascript">
//ClientSide validation
function CheckRootCause(sender, args) {
//TODO: remove this if not needed
<% #warning "unused code" %>
var iValue = parseInt(args.Value);
args.IsValid = iValue > 0;
}
</script>
The TODO isn't picked up by VS's task list, the <% #warning %>
gives 3 warnings instead of just 1. The warning itself, an Expected expression warning, and an Invalid character warning. It also gives 3 resharper underlines whe I'm looking at the code, including a red one as if it was a no-compile error.
I'm looking for something that does any of the following
- Visual Studio picks up into the Task List
- Visual Studio picks up as a single warning on the ErrorList
- Visual Studio warns about because
it's marked
Obsolete
- Resharper picks up as a todo on code-analysis
Or any other trick that would help me find this and clean it later.
Is there anything?