Skip to content

Using ast-grep as a library #80

@charliermarsh

Description

@charliermarsh

Awesome project! I'm interested in potentially using ast-grep as the foundation for Ruff's plugin system (some discussion in astral-sh/ruff#283).

What I'm envisioning: users express custom lint rules via the ast-grep YAML syntax; Ruff picks up those rules, parses + executes them via ast-grep, and includes the surfaced messages + fixes in its own output abstractions.

Before I dig in, I wanted to see if (1) this kind of use-case is within-scope for ast-grep, (2) if it's possible now or depends on future work, and (3) if you had any pointers on how to get started (I know the API docs are a work-in-progress so any tips would be appreciated).

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is neededquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions