You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: website/reference/cli/run.md
+18Lines changed: 18 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -87,6 +87,12 @@ Enable search code from StdIn.
87
87
88
88
Use this if you need to take code stream from standard input.
89
89
90
+
### `--globs <GLOBS>`
91
+
92
+
Include or exclude file paths.
93
+
94
+
Include or exclude files and directories for searching that match the given glob. This always overrides any other ignore logic. Multiple glob flags may be used. Globbing rules match .gitignore globs. Precede a glob with a `!` to exclude it. If multiple globs match a file or directory, the glob given later in the command line takes precedence.
95
+
90
96
### `--follow`
91
97
92
98
Follow symbolic links.
@@ -141,6 +147,18 @@ Possible values:
141
147
-**always**: Always print heading regardless of output type
142
148
-**never**: Never print heading regardless of output type
143
149
150
+
### `--tracing <LEVEL>`
151
+
152
+
Show tracing information for file/rule discovery and scanning.
153
+
154
+
This flag helps user to inspect ast-grep's internal filtering of files and rules. tracing will output how many and why files and rules are scanned and skipped. tracing information outputs to stderr and does not affect the result of the search.
155
+
156
+
[default: nothing]
157
+
158
+
Possible values:
159
+
-**nothing**: Do not show any tracing information
160
+
-**summary**: Show summary about how many files are scanned and skipped
Copy file name to clipboardExpand all lines: website/reference/cli/scan.md
+18Lines changed: 18 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -67,6 +67,12 @@ Follow symbolic links.
67
67
68
68
This flag instructs ast-grep to follow symbolic links while traversing directories. This behavior is disabled by default. Note that ast-grep will check for symbolic link loops and report errors if it finds one. ast-grep will also report errors for broken links.
69
69
70
+
### `--globs <GLOBS>`
71
+
72
+
Include or exclude file paths.
73
+
74
+
Include or exclude files and directories for searching that match the given glob. This always overrides any other ignore logic. Multiple glob flags may be used. Globbing rules match .gitignore globs. Precede a glob with a `!` to exclude it. If multiple globs match a file or directory, the glob given later in the command line takes precedence.
75
+
70
76
## Output Options
71
77
72
78
### `-i, --interactive`
@@ -88,6 +94,18 @@ Possible values:
88
94
- stream: Prints each match as a separate JSON object, followed by a newline character. This is useful for streaming the output to other programs that can read one object per line
89
95
- compact: Prints the matches as a single-line JSON array, without any whitespace. This is useful for saving space and minimizing the output size
90
96
97
+
### `--tracing <LEVEL>`
98
+
99
+
Show tracing information for file/rule discovery and scanning.
100
+
101
+
This flag helps user to inspect ast-grep's internal filtering of files and rules. tracing will output how many and why files and rules are scanned and skipped. tracing information outputs to stderr and does not affect the result of the search.
102
+
103
+
[default: nothing]
104
+
105
+
Possible values:
106
+
-**nothing**: Do not show any tracing information
107
+
-**summary**: Show summary about how many files are scanned and skipped
108
+
91
109
### `--format <FORMAT>`
92
110
Output warning/error messages in GitHub Action format.
0 commit comments