Gruntfuggly / todo-tree

Use ripgrep to find TODO tags and display the results in a tree view
Other
1.4k stars 134 forks source link

[BIG BUG] Not every file searched #789

Open mrx23dot opened 10 months ago

mrx23dot commented 10 months ago

I have limiter.c and map.c in same workspace

todo-tree only finds todo in map.c, and nothing else. I open up limiter.c and todos are not even highlighted, even after reload.

image

v0.0.226, with default config, why would it only partially work?

technic960183 commented 7 months ago

It seems that this is not a bug. For the default regular expression setting for matching TODOs, /* request TODO doesn't match the pattern (//|#|<!--|;|/\*|^|^[ \t]*(-|\d+.))\s*($TAGS). Modify your comments to /* TODO module on */ and check if this file has been searched.

This extension will only work when your comments match the regular expression. You can modify the style of your comments or set your own regular expression.

mrx23dot commented 7 months ago

Don't know about you, but I would like to know about lines like

// paint it red todo
// paint it red fixme

todo/fixme would be rarely part of a sentence. this worked better for me: "todo-tree.regex.regex":"\\b($TAGS)"

Also I think the default for this is more harmful than useful todo-tree.regex.regexCaseSensitive (true) old code base might have a comment like // fixme or this will kill people new developer installs this addon, sees some results, but wouldn't know about missed cases.

Check out Eclipse for reference, works great out of the box.

Would it be possible to ask VScode to provide the comment context, instead hardcoding the format of comment into regexp? It would be more generic. So it would only search in comments.