by underyx · 5y ago · 0 comments
Hey, I'm a maintainer of Semgrep, and this sounds like a pretty good description of what the CLI can do, see this example for finding all function/class/method calls:
$ semgrep -e '$NAME(...)' -l python
flask_todomvc/extensions.py
4:db = SQLAlchemy()
------------------------------------------------------------
5:security = Security()
flask_todomvc/factory.py
15: app = Flask(__name__)
------------------------------------------------------------
17: app.config.from_object(settings)
------------------------------------------------------------
18: app.config.from_envvar('TODO_SETTINGS', silent=True)Looks like a pretty useful tool with a couple nice options. A bit strange that the `-e` option is only explained on the website, but to be fair it seems to be a lot to cover. Still, a kind of "cheat sheet" style summary in the help message would be fantastic, just as a little suggestion.