workspace search unreliable
I stumbled on what I think is a bug, or at least unexpected behavior.
I have previously had todo-tree configured to check open files and my workspace, but noticed that some TODOs were not picked up correctly. Upon closer investigation, it seems that the workspace search simply doesn't work. I am running this on an Ubuntu Azure Machine Learning Compute Instance, connected via AzureML Remote VSCode Connection.
"todo-tree.general.debug": true,
"todo-tree.general.periodicRefreshInterval": 5,
"todo-tree.highlights.highlightDelay": 10,
"todo-tree.regex.regexCaseSensitive": false,
"todo-tree.tree.buttons.scanMode": true,
"todo-tree.highlights.customHighlight": {
"TODO": {
"icon": "check-circle-fill",
"foreground": "#000000",
"background": "#df4802fd",
"iconColour": "#df4802fd"
},
"BUG": {
"icon": "bug",
"foreground": "#000000",
"background": "#fa0000fd",
"iconColour": "#fa0000fd"
},
"FIXME": {
"icon": "tools",
"foreground": "#000000",
"background": "#4ffa00fd",
"iconColour": "#4ffa00fd"
},
},
"todo-tree.general.tags": [
"BUG",
"FIXME",
"TODO",
],
"todo-tree.regex.regex": "(//|#|<!--|;|/\\*|^|^\\s*(-|\\d+.))\\s*($TAGS).*(\\n\\s*//\\s{2,}.*)*",
"todo-tree.general.statusBar": "top three",
"todo-tree.tree.scanMode": "workspace"
Looking at the extension output, I see that no TODOs are found:
12:40:14.603 Searching /home/azureuser/localfiles/my-project...
12:40:14.604 Writing pattern file:/home/azureuser/.vscode-server/data/User/workspaceStorage/526a3cf11b5efd4dd319b7ab3024cdd2/Gruntfuggly.todo-tree/ajfva7xh7.txt
12:40:14.604 Pattern:(//|#|<!--|;|/\*|^|^\s*(-|\d+.))\s*(TODO|FIXME|BUG).*(\n\s*//\s{2,}.*)*
12:40:14.605 Command: /home/azureuser/.vscode-server/bin/05047486b6df5eb8d44b2ecd70ea3bdf775fd937/node_modules/@vscode/ripgrep/bin/rg --no-messages --vimgrep -H --column --line-number --color never --max-columns=1000 --no-config -i -U -f "/home/azureuser/.vscode-server/data/User/workspaceStorage/526a3cf11b5efd4dd319b7ab3024cdd2/Gruntfuggly.todo-tree/ajfva7xh7.txt" -g "!**/node_modules/*/**" "/home/azureuser/localfiles/my-project"
12:40:14.651 Found 0 items
12:40:14.652 Applying globs to 0 items...
12:40:14.652 Remaining items: 0
But when I open a file with TODOs, I do find them in the UI, but not in the extension output:
UI:
Output after refreshing manually:
12:43:34.196 Searching /home/azureuser/localfiles/my-project...
12:43:34.197 Writing pattern file:/home/azureuser/.vscode-server/data/User/workspaceStorage/526a3cf11b5efd4dd319b7ab3024cdd2/Gruntfuggly.todo-tree/1twkzxz49e.txt
12:43:34.198 Pattern:(//|#|<!--|;|/\*|^|^\s*(-|\d+.))\s*(TODO|FIXME|BUG).*(\n\s*//\s{2,}.*)*
12:43:34.198 Command: /home/azureuser/.vscode-server/bin/05047486b6df5eb8d44b2ecd70ea3bdf775fd937/node_modules/@vscode/ripgrep/bin/rg --no-messages --vimgrep -H --column --line-number --color never --max-columns=1000 --no-config -i -U -f "/home/azureuser/.vscode-server/data/User/workspaceStorage/526a3cf11b5efd4dd319b7ab3024cdd2/Gruntfuggly.todo-tree/1twkzxz49e.txt" -g "!**/node_modules/*/**" "/home/azureuser/localfiles/my-project"
12:43:34.249 Found 0 items
12:43:34.249 Applying globs to 0 items...
12:43:34.249 Remaining items: 0
I am curious to understand why I get matches in the UI, but not in the results.
Just saw that there is already a similar issue: #734