ast-grep sgconfig.yml
ast-grep project config
| Type | Project |
|---|---|
| File match |
sgconfig.yml
sgconfig.yaml
|
| Schema URL | https://catalog.lintel.tools/schemas/ast-grep/ast-grep-sgconfig-yml/latest.json |
| Source | https://raw.githubusercontent.com/ast-grep/ast-grep/main/schemas/project.json |
Validate with Lintel
npx @lintel/lintel check
Definitions
A list of string instructing where to discover ast-grep's YAML rules.
A list of object to configure ast-grep's test cases. Each object can have two fields.
A list of string instructing where to discover ast-grep's global utility rules.
A mapping to associate a language to files that have non-standard extensions or syntaxes.
A dictionary of custom languages in the project.
A list of language injections to support embedded languages in the project like JS/CSS in HTML. This is an experimental feature.
A string specifies where to discover test cases for ast-grep.
A string path relative to testDir that specifies where to store test snapshots for ast-grep. You can think it like snapshots_ in popular test framework like jest. If this option is not specified, ast-grep will store the snapshot under the snapshots folder under the testDir.
The path to the tree-sitter dynamic library of the language.
The file extensions for this language.
An optional char to replace $ in your pattern.
The dylib symbol to load ts-language, default is tree_sitter_{name}
A list of language injections to support embedded languages in the project like JS/CSS in HTML. This is an experimental feature.
The host language name, e.g. html. This is the language of documents that contains the embedded language code.
Defines the ast-grep rule to identify the injected language region within the host language documents.
The injected language name