-
-
Notifications
You must be signed in to change notification settings - Fork 336
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Please read the FAQ for the bug you encountered.
- I have read the existing FAQ
β― Playground Link
N/A
π» Code
secret.js:
console.log(123)
π Actual behavior
ast-grep run --pattern 'console.log'β
Returns the match in secret.js as expected.
ast-grep run --pattern 'console.log' --lang jsβ
Continues to match in secret.js as expected.
ast-grep run --pattern 'console.log' --globs '!secret*'β
Does not match file (since the glob excludes secret.js)
ast-grep run --pattern 'console.log' --lang js --globs '!secret*'β Returns the match in secret.js, which is supposed to be excluded by --globs
π Expected behavior
I expect --lang and --globs to coexist. In my example, I would like to be able to search JS files that match my glob expression. I haven't found a spot in the docs that explains that these options are one-or-the-other.
Additional information about the issue
Potentially related issue: #1842.
Running ast-grep 0.36.0.
Thank you for all of your hard work on this awesome tool.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working