Comment

Comment by underyx

> it's a grep that can search code snippets based on language-aware syntax matching instead of regular expressions.

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)
parent underyx 5 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton