Gruntfuggly / todo-tree

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

Shows matching entries for open/activated files/tabs only #620

Closed inactivist closed 2 years ago

inactivist commented 2 years ago

If scan mode is set to workspace only, no results show in todo tree. If set to open files (or workspace + open files), the extension shows results only for activated files and tabs. For example, when restoring a workspace, even if file is in the open files list (and in a not-yet-activatated tab), the file's TODOs (or other matching tags) only show in results panel after initially activating the file's tab. Once the tab is activated, the matching tags are shown in the todo tree results panel.

I'm looking for suggestions on how to troubleshoot this. This behavior started a few months back, not sure what triggered it.

I've tried resetting all todo-tree settings (both user and workspace) to default values, but that didn't change anything.

I've enabled debug output but I don't see anything useful (it shows that it's scanning the workspace folder, the pattern file info, the ripgrep command line, but no errors or other warnings.) It appears that the temp files are deleted immediately after command completion so I can't examine them or invoke the command again with the generated files.

09:42:49.887 Searching /home/inactivist/m/src/mycompany/someproject...
09:42:49.888 Writing pattern file:/home/inactivist/.config/Code/User/workspaceStorage/[hashcode-elided]/Gruntfuggly.todo-tree/bq3othj47.txt
09:42:49.888 Pattern:(//|#|<!--|;|/\*|^|^[ \t]*(-|\d+.))\s*(\[x\]|\[ \]|XXX|TODO|HACK|FIXME|BUG)
09:42:49.888 Command: /usr/share/code/resources/app/node_modules.asar.unpacked/@vscode/ripgrep/bin/rg --no-messages --vimgrep -H --column --line-number --color never --max-columns=1000 --no-config  -f "/home/inactivist/.config/Code/User/workspaceStorage/[hashcode-elided]/Gruntfuggly.todo-tree/bq3othj47.txt" -g "!**/node_modules" "/home/inactivist/m/src/mycompany/someproject"
09:42:49.924 Found 29 items
09:42:49.924 Applying globs to 29 items...
09:42:49.926 Remaining items: 29

(Note there are many, many more than 29 files in the workspace containing TODO, FIXME, etc. comments. The 29 shown are the ones in the open / activated file tabs)

Any troubleshooting pointers appreciated.

=== Todo Tree version: v0.0.215

VSCode version:

Version: 1.65.2
Commit: c722ca6c7eed3d7987c0d5c3df5c45f6b15e77d1
Date: 2022-03-10T15:36:26.048Z
Electron: 13.5.2
Chromium: 91.0.4472.164
Node.js: 14.16.0
V8: 9.1.269.39-electron.0
OS: Linux x64 5.4.0-105-generic
inactivist commented 2 years ago

Interesting: Adding --no-ignore to ripgrep args seems to provide some relief, though I'm not sure which ignore file(s) may be contributing to my woes.

"todo-tree.ripgrep.ripgrepArgs": "--max-columns=1000 --no-config --no-ignore"

inactivist commented 2 years ago

Tracked it down to an errant .gitignore in the parent directory chain. Closing.