Multi line TODO lists

Is there anyway or any regular expressions which will pick multi line TODO comments like:

# TODO: do that and this

# and please do this also blah blah

nothing I've I tried as a regular expression in Settings | TODO | Patterns is working.

Thanks

5 comments
Comment actions Permalink

Hello Erkan,

No, this is not possible. In a general case, there is no possibility to determine

whethe the line following a TODO comment line is semantically part of the

TODO or not.

Is there anyway or any regular expressions which will pick multi line

TODO comments like:

  1. TODO: do that and this

  2. and please do this also blah blah

nothing I've I tried as a regular expression in Settings | TODO |

Patterns is working.

--

Dmitry Jemerov

Development Lead

JetBrains, Inc.

http://www.jetbrains.com/

"Develop with Pleasure!"

0
Comment actions Permalink

I saw a couple of other discussions dated back to 2003 and a they were suggesting to include the comment lines immediately following the first TODO comment should be considered as the rest of the TODO.

for:

todo = """    # TODO: do something and
    # something other
    # and this is too
    but do not pick this one"""

re.findall(r"\btodo\b[ #\s\S\w\W]*\n", todo, flags=re.IGNORECASE)

will return

['TODO: do something and\n    # something other\n    # and this is too\n']

which is what I want (ugly!), but it will not find any TODO lines when I enter this pattern to the TODO pattern setting.

Anyway I'll try to keep using single line TODOs

Thanks for your quick response.

1
Comment actions Permalink

+1 for multi-line TODO and FIXME

See also Multi-line TODOs

0
Comment actions Permalink

Please vote for corresponding feature request: IDEA-62161.

1
Comment actions Permalink

Just cause this was one of the first hits when I was searching how to do it in 2018.3

 

It is there now... pycharm, webstorm, etc. 

https://www.jetbrains.com/help/pycharm/using-todo.html

https://blog.jetbrains.com/webstorm/2018/09/webstorm-2018-3-eap-2/

 

Edit: Just saw the date on this thread. Patience is a virture.... lol

0

Please sign in to leave a comment.