-
-
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
(Not too relevant, as this is a bug with the CLI)
💻 Code
Command
sg scan --inline-rules '
id: console-log
language: JavaScript
rule:
pattern: console.log
' --globs 'not-real.js'Code
// in file1.js
console.log("Hello World")
// in file2.js
console.log("Hello World")🙁 Actual behavior
Matches in both files are returned. This is incorrect as the glob pattern should not match either file.
🙂 Expected behavior
No matches are returned, as the glob pattern does not match either file.
Additional information about the issue
It is as if the --globs option has no effect on the scan command.
In addition, specifying only one of the two files, or excluding files using globs that begin with ! also don't seem to work.
This is reproducible when passing a rule from a file as well.
Running ast-grep 0.35.0, as returned by sg -V.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working