Priority
Normal
Type
Usability Problem 
State
Won't fix 
Assignee
Ilya Ryzhenkov 
Subsystem
No subsystem 
Affected versions
Fixed in
Fixed in build
5.0.1612.107  
  • Submitted by   Rory Primrose
    2 years ago (25 Mar 2008 05:54)
  • Updated by   Rory Primrose
    2 years ago (25 Mar 2008 12:49)
  • Jira: RSRP-62418
    (history, comments)
RSRP-62418 Comment notes get incorrectly identified in code
0
Comment notes get incorrectly identified in code. If the comment contains the string "note" or "todo" anywhere in the comment sentance, it is considered as a note. This should probably only get identified if "note" or "todo" exists at the start of the comment line.

For example, if my code contains the comment

// There are a few things to note about the service behavior configuration

The part that gets identified as a note is the string "note about the service behavior configuration", but I am intentionally not writing the comment so that it gets picked up like a NOTE: or TODO: would.

It would be more appropriate if the note was only identified if the token was at the beginning of the comment rather than part of the flow of a sentance. For example

// NOTE: This type has a particular behaviour where......

Issue was closed
Comments (2)
 
History
 
Linked Issues (0)
 
TeamCity Changes (0)
 
Rory Primrose
  Rory Primrose
25 Mar 2008 06:19
(2 years ago)
I have just found that ReSharper manages its own regex values for comment tokens.

I have modified the ReSharper -> Options -> To-do Items -> Todo pattern from (\W|^)(?<TAG>TODO)(\W|$)(.) to ^(?<TAG>TODO)(\W|$)(.). This now only identifies the todo when it is at the beginning of the line. I have made the same changes to Note and Bug.

I was going to say ignore this issue, but perhaps the default regex should not include \W| at the beginning of the regex.
Ilya Ryzhenkov
  Ilya Ryzhenkov
25 Mar 2008 12:49
(2 years ago)
Options / Tools / To-do Items