Gruntfuggly / todo-tree

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

Tag Description shows 'undefined' in v0.0.200 #451

Closed jerrens closed 3 years ago

jerrens commented 3 years ago

On version 0.0.199, my side-bar showed my tags correctly: image

However, after the v0.0.200 update, it now shows: image

My Settings are:

"todo-tree.regex.regex": "((//|#|<!--|;|\/\\*|\\*)\\s*($TAGS)\\b|^\\s*- \\[ \\])",
"todo-tree.regex.subTagRegex": "^:\\s*",
"todo-tree.regex.regexCaseSensitive": false,
"todo-tree.highlights.enabled": true, // Enable so that we get the icon and other features
"todo-tree.tree.showCountsInTree": true, // Show how many comments are present in the group or file
"todo-tree.tree.disableCompactFolders": false, // This will get rid of the trailing folder paths, but then there is more to expand
"todo-tree.tree.labelFormat": "${afterOrBefore}", // Default to get the text after the tag, if not present use the test before the tag
"todo-tree.tree.buttons.export": true, // Give option to export the items to a file
"todo-tree.general.tags": [
    "BUG",
    "DEBUG",
    "END REGION",
    "FIX",
    "FIXME",
    "HACK",
    "IDEA",
    "NOTE",
    "OPTIMIZE",
    "REGION",
    "REVIEW",
    "TODO",
    "UGLY"
],
"todo-tree.general.tagGroups": {
    "DEBUG": [
        "BUG",
        "DEBUG"
    ],
    "FIXME": [
        "FIXME",
        "FIX"
    ],
    "REVIEW": [
        "REVIEW",
        "OPTIMIZE",
        "UGLY"
    ]
},
"todo-tree.filtering.excludeGlobs": [
    "**/*.code-workspace"
],
"todo-tree.highlights.defaultHighlight": {
    "background": "#00000000", // Hide the background because we want the Highlight pluging to handle the different colors
    "gutterIcon": true // Default to show the gutter icon unless specifically turned off
},
// Icon names from https://primer.style/octicons/
"todo-tree.highlights.customHighlight": {
    "DEBUG": {
        "icon": "bug",
        "iconColour": "#cc0000" // Red
    },
    "END REGION": {
        "icon": "fold-up",
        "iconColour": "#006600", // Green
        "hideFromTree": true, // Regions don't need to be included in the tree
    },
    "FIXME": {
        "icon": "flame",
        "iconColour": "#ff8000" // Orange
    },
    "HACK": {
        "icon": "zap", // Alternates: squirrel, cpu
        "iconColour": "#9933FF" // Purple
    },
    "IDEA": {
        "icon": "light-bulb",
        "iconColour": "#bbbb22" // Yellow
    },
    "NOTE": {
        "icon": "pencil",
        "iconColour": "#ff00ff", // Indego
        "hideFromTree": true, // Notes don't need to be included in the tree
        "gutterIcon": false // No need to see note comments in the gutter
    },
    "REGION": {
        "icon": "fold-down",
        "iconColour": "#006600", // Green
        "hideFromTree": true, // Regions don't need to be included in the tree
    },
    "REVIEW": {
        "icon": "eye",
        "iconColour": "#00ccff" // Aqua
    },
    "TODO": {
        "icon": "check-circle",
        "iconColour": "#009900", // Green
    },
},

Is there a new setting now needed in the regex since I'm overriding the default?

Gruntfuggly commented 3 years ago

Your settings seem to work OK for me - please could you post one of the files (or part of it) which is showing the behaviour?

jerrens commented 3 years ago

Here is a screenshot: image

and the snippet

const databaseName = 'DatabaseName'; // HACK: This should not be hard-coded
const collectionName = 'CollectionName'; // FIXME: This should be updated to allow the UI to specify the collection name
Gruntfuggly commented 3 years ago

OK - I can reproduce it. For now, if you disable the todo-tree.tree.labelFormat setting it will prevent the error.

I'll get a proper fix ASAP.

Gruntfuggly commented 3 years ago

Fixed in 0.0.201

jerrens commented 3 years ago

v 0.0.201 Looks good!

Thank you for the quick response and fix!

Gruntfuggly commented 3 years ago

No problem 🙂