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
Please sign in to leave a comment.
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.
--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"
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 for multi-line TODO and FIXME
See also Multi-line TODOs
Please vote for corresponding feature request: IDEA-62161.
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