Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding negation '!' in "exclude" glob array returns "No embedded todos found" #83

Closed
a-maqsood opened this issue Jul 19, 2018 · 3 comments

Comments

@a-maqsood
Copy link

Hi, Thank you for creating this awesome extension. You guys are doing great. I really like this extension. Currently I am facing an issue

My exclude settings are as follows:

"todo.embedded.exclude": [
        "**/.git",
        "**/.svn",
        "**/.hg",
        "**/.vscode",
        "**/.github",
        "**/.next",
        "**/node_modules",
        "**/bower_components",
        "**/dist",
        "**/build",
        "**/out",
        "**/output",
        "**/_output",
        "**/third_party",
        "**/*.min.*",
        "**/*.map",
        "local/vendor/**",
        "local/storage/**",
        "js",
        "!js/main.js"
    ]

What I expect for todo-plus is to ignore all files in "js" folder except "js/main.js" but adding '!' in front of "js/main.js" doesn't generate TODOs list and shows notifications "No embedded todos found".

If I remove '!' from "!js/main.js" then it works correctly but I want todo-plus to not ignore "js/main.js". Am I missing something? Help me please

@fabiospampinato
Copy link
Owner

Hi, Thank you for creating this awesome extension. You guys are doing great. I really like this extension.

Thank you :)

What I expect for todo-plus is to ignore all files in "js" folder except "js/main.js" but adding '!' in front of "js/main.js" doesn't generate TODOs list and shows notifications "No embedded todos found".

It feels a bit weird to have negative globs for "exclusion", but I think it actually makes sense.

Anyway this is an upstream issue, the globs are handled by globby which in turns uses fast-glob under the hood, that seems to be to source of this problem (mrmlnc/fast-glob#86 mrmlnc/fast-glob#103)

@a-maqsood
Copy link
Author

@fabiospampinato Thank you for quick reply,

Anyway this is an upstream issue, the globs are handled by globby which in turns uses fast-glob under the hood, that seems to be to source of this problem (mrmlnc/fast-glob#86 mrmlnc/fast-glob#103)

Yeah it definitely isn't an issue with vscode-todo-plus then, from linked issues to fast-glob, it looks like lot of people are expecting this functionality in fast-glob. My hopes are high, may be we get this functionality in fast-glob soon. :)

Anyway I tried adding "js" in exclude glob and "js/main.js" in include glob and it worked, it ignored all files in "js" except "js/main.js"

Again, Thank you for helping me :)

@fabiospampinato
Copy link
Owner

Anyway I tried adding "js" in exclude glob and "js/main.js" in include glob and it worked, it ignored all files in "js" except "js/main.js"

Nice, I'm glad you found a solution to this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants