{
  "id": "ruff",
  "name": "Ruff",
  "homepage": "https://docs.astral.sh/ruff/",
  "description": "An extremely fast Python linter and code formatter, written in Rust.",
  "icon": "SimpleIcons:ruff",
  "executables": [
    "ruff"
  ],
  "dotfiles": {
    "paths": [
      "[configHome]/ruff/.ruff.toml",
      "[configHome]/ruff/ruff.toml",
      "[configHome]/ruff/pyproject.toml"
    ],
    "exclude": [],
    "secret": [],
    "side_effect": false
  },
  "commands": {
    "format": 1,
    "label": "Ruff",
    "description": "Lint and format Python code. Global options (--config, --isolated) are not included.",
    "quality": "ai-draft",
    "base": "fig:ruff",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": false
    },
    "source": [
      {
        "id": "fig",
        "kind": "completion",
        "url": "https://github.com/withfig/autocomplete/blob/master/src/ruff.ts",
        "license": "MIT"
      }
    ],
    "subcommand": [
      {
        "path": [
          "check"
        ],
        "label": "Lint",
        "description": "Run the Ruff linter on files or directories.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/ruff.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "paths",
            "label": "Files or directories",
            "type": "path",
            "position": 0,
            "multiple": true,
            "path": {
              "kind": "any",
              "role": "input"
            },
            "sources": [
              "fig"
            ]
          },
          {
            "id": "fix",
            "label": "Apply fixes",
            "type": "boolean",
            "option": [
              "--fix"
            ],
            "effect": "overwrite",
            "sources": [
              "fig"
            ]
          },
          {
            "id": "unsafe_fixes",
            "label": "Include unsafe fixes",
            "type": "boolean",
            "option": [
              "--unsafe-fixes"
            ],
            "effect": "overwrite",
            "sources": [
              "fig"
            ]
          },
          {
            "id": "diff",
            "label": "Show diff, write nothing",
            "type": "boolean",
            "option": [
              "--diff"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "select",
            "label": "Enable rules",
            "type": "string",
            "option": [
              "--select"
            ],
            "description": "Comma-separated rule codes, or ALL.",
            "sources": [
              "fig"
            ]
          },
          {
            "id": "ignore",
            "label": "Disable rules",
            "type": "string",
            "option": [
              "--ignore"
            ],
            "description": "Comma-separated rule codes.",
            "sources": [
              "fig"
            ]
          },
          {
            "id": "output_format",
            "label": "Output format",
            "type": "string",
            "option": [
              "--output-format"
            ],
            "suggestions": [
              {
                "value": "concise",
                "label": "concise"
              },
              {
                "value": "full",
                "label": "full"
              },
              {
                "value": "json",
                "label": "json"
              },
              {
                "value": "json-lines",
                "label": "json-lines"
              },
              {
                "value": "junit",
                "label": "junit"
              },
              {
                "value": "grouped",
                "label": "grouped"
              },
              {
                "value": "github",
                "label": "github"
              },
              {
                "value": "gitlab",
                "label": "gitlab"
              },
              {
                "value": "pylint",
                "label": "pylint"
              },
              {
                "value": "rdjson",
                "label": "rdjson"
              },
              {
                "value": "azure",
                "label": "azure"
              },
              {
                "value": "sarif",
                "label": "sarif"
              }
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "target_version",
            "label": "Target Python version",
            "type": "string",
            "option": [
              "--target-version"
            ],
            "suggestions": [
              {
                "value": "py37",
                "label": "py37"
              },
              {
                "value": "py38",
                "label": "py38"
              },
              {
                "value": "py39",
                "label": "py39"
              },
              {
                "value": "py310",
                "label": "py310"
              },
              {
                "value": "py311",
                "label": "py311"
              },
              {
                "value": "py312",
                "label": "py312"
              },
              {
                "value": "py313",
                "label": "py313"
              }
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "statistics",
            "label": "Show statistics",
            "type": "boolean",
            "option": [
              "--statistics"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "watch",
            "label": "Watch for changes",
            "type": "boolean",
            "option": [
              "--watch",
              "-w"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "exclude",
            "label": "Exclude paths",
            "type": "string",
            "option": [
              "--exclude"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "exit_zero",
            "label": "Always exit 0",
            "type": "boolean",
            "option": [
              "--exit-zero",
              "-e"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "lint",
            "label": "Lint",
            "fields": [
              "paths",
              "select",
              "ignore",
              "output_format"
            ]
          },
          {
            "id": "fix",
            "label": "Lint and fix",
            "fields": [
              "paths",
              "fix"
            ],
            "required": [
              "fix"
            ],
            "set": {
              "fix": [
                true
              ]
            }
          },
          {
            "id": "preview",
            "label": "Preview fixes as diff",
            "fields": [
              "paths",
              "diff"
            ],
            "required": [
              "diff"
            ],
            "set": {
              "diff": [
                true
              ]
            }
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "paths",
              "fix",
              "unsafe_fixes",
              "diff",
              "select",
              "ignore"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "output_format",
              "target_version",
              "statistics",
              "watch",
              "exclude",
              "exit_zero"
            ]
          }
        ]
      },
      {
        "path": [
          "format"
        ],
        "label": "Format",
        "description": "Run the Ruff formatter on files or directories.",
        "source": [
          {
            "id": "fig",
            "kind": "completion",
            "url": "https://github.com/withfig/autocomplete/blob/master/src/ruff.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "paths",
            "label": "Files or directories",
            "type": "path",
            "position": 0,
            "multiple": true,
            "path": {
              "kind": "any",
              "role": "input"
            },
            "effect": "overwrite",
            "sources": [
              "fig"
            ]
          },
          {
            "id": "check",
            "label": "Check only",
            "type": "boolean",
            "option": [
              "--check"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "diff",
            "label": "Show diff, write nothing",
            "type": "boolean",
            "option": [
              "--diff"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "line_length",
            "label": "Line length",
            "type": "integer",
            "option": [
              "--line-length"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "target_version",
            "label": "Target Python version",
            "type": "string",
            "option": [
              "--target-version"
            ],
            "suggestions": [
              {
                "value": "py37",
                "label": "py37"
              },
              {
                "value": "py38",
                "label": "py38"
              },
              {
                "value": "py39",
                "label": "py39"
              },
              {
                "value": "py310",
                "label": "py310"
              },
              {
                "value": "py311",
                "label": "py311"
              },
              {
                "value": "py312",
                "label": "py312"
              },
              {
                "value": "py313",
                "label": "py313"
              }
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "exclude",
            "label": "Exclude paths",
            "type": "string",
            "option": [
              "--exclude"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "format",
            "label": "Format",
            "fields": [
              "paths"
            ]
          },
          {
            "id": "check",
            "label": "Check formatting",
            "fields": [
              "paths",
              "check"
            ],
            "required": [
              "check"
            ],
            "set": {
              "check": [
                true
              ]
            }
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "paths",
              "check",
              "diff",
              "line_length"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "target_version",
              "exclude"
            ]
          }
        ]
      }
    ]
  }
}
