Comments (2)
nope, ast-grep search will follow VSCode's decision.
from ast-grep.
Also, you can use the command
git diff --name-only | xargs -I % ast-grep -p 'pattern' %
-
git diff --name-only
: This Git command lists the names of files that have changed. The--name-only
option ensures that only the file names are printed, without any additional diff information. -
|
: The pipe character takes the output from the command on the left (the list of changed file names) and passes it as input to the command on the right. -
xargs -I %
: This command takes the list of file names from the previous command and passes each one as an argument to another command. The-I %
option tellsxargs
to replace each occurrence of%
in the following command with the current file name it's processing. -
ast-grep -p 'pattern' %
: Useast-grep
to search the patter.%
will be the file names passed byxargs
fromgit diff
from ast-grep.
Related Issues (20)
- returns the number of overall number of errors in sg scan
- [refactor] merge CombinedScan::scan and CombinedScan::diff
- [feature] support ast-grep-ignore suppression in LSP scanning
- [feature] TypeScript types for Rules in NAPI
- [bug] php(alpha) can not match pattern HOT 2
- [bug] `fn $FUNC($$$ARGS) { $$$ }` does not match the function item of Rust HOT 1
- [bug] Literal strings are matched generically HOT 5
- [feature] generate a warning or error if an invalid kind or field is used
- [bug] Matching string literals in Rust inner attributes behaves strangely HOT 12
- [feature] Add a way to override rule severities from the CLI HOT 3
- [feature] support glob path match in CLI. HOT 1
- report undefined meta variable
- analyze meta variables defined in pattern
- export meta variables defined in transform
- export meta variables defined in constraints/rules
- define the resolution order of meta variables
- export used meta-var in transform
- report undefined meta-var in fix
- Allow to use meta variable captured outside of rewrite rule inside the rewriter HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ast-grep.