astgrep_lint
Validate and enforce code quality using customizable YAML rules. Specify paths, severity levels, and output formats to streamline linting in a secure JavaScript REPL environment.
Instructions
Rule-based code validation using ast-grep YAML rules
Input Schema
Name | Required | Description | Default |
---|---|---|---|
format | No | Output format | |
paths | No | Specific paths to validate | |
rules | Yes | YAML rule content or path to rule file | |
severity | No | Minimum severity level | |
workingDirectory | No | Optional working directory for the operation (defaults to server working directory) |
Input Schema (JSON Schema)
{
"properties": {
"format": {
"description": "Output format",
"enum": [
"json",
"text"
],
"type": "string"
},
"paths": {
"description": "Specific paths to validate",
"items": {
"type": "string"
},
"type": "array"
},
"rules": {
"description": "YAML rule content or path to rule file",
"type": "string"
},
"severity": {
"description": "Minimum severity level",
"enum": [
"error",
"warning",
"info",
"hint"
],
"type": "string"
},
"workingDirectory": {
"description": "Optional working directory for the operation (defaults to server working directory)",
"type": "string"
}
},
"required": [
"rules"
],
"type": "object"
}