Crate ast_grep_config

Source

Structs§

CombinedScan
A struct to group all rules according to their potential kinds. This can greatly reduce traversal times and skip unmatchable rules. Rules are referenced by their index in the rules vector.
DeserializeEnv
A struct to store information to deserialize rules.
Fixer
Label
A label is a way to mark a specific part of the code with a styled message. It is used to provide diagnostic information in LSP or CLI. ’r represents a lifetime for the message string from rule. ’t represents a lifetime for the node from a ast tree.
Metadata
A trivial wrapper around a HashMap to work around the limitation of serde_yaml::Value not implementing JsonSchema.
RuleCollection
A collection of rules to run one round of scanning. Rules will be grouped together based on their language, path globbing and pattern rule.
RuleConfig
RuleCore
SerializableRule
A rule object to find matching AST nodes. We have three categories of rules in ast-grep.
SerializableRuleConfig
SerializableRuleCore
Used for global rules, rewriters, and pyo3/napi

Enums§

LabelStyle
Rule
RuleConfigError
RuleCoreError
RuleSerializeError
Severity
Transformation

Functions§

from_str
from_yaml_string

Type Aliases§

GlobalRules