{
  "id": "rubocop",
  "name": "RuboCop",
  "homepage": "https://rubocop.org",
  "description": "RuboCop is a Ruby static code analyzer (a.k.a. linter) and code formatter.",
  "icon": "SimpleIcons:rubocop",
  "executables": [
    "rubocop"
  ],
  "dotfiles": {
    "paths": [
      "~/.rubocop.yml",
      "[configHome]/rubocop/config.yml"
    ],
    "exclude": [
      "[xdgCache]/rubocop_cache/",
      "[xdgCache]/*/rubocop_cache/"
    ],
    "secret": [],
    "side_effect": false
  },
  "commands": {
    "format": 1,
    "label": "Inspect Ruby code",
    "description": "Inspect files with RuboCop, optionally autocorrecting.",
    "quality": "ai-draft",
    "base": "fig:rubocop",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": true
    },
    "source": [
      {
        "id": "fig",
        "kind": "completion",
        "url": "https://github.com/withfig/autocomplete/blob/master/src/rubocop.ts",
        "license": "MIT"
      }
    ],
    "field": [
      {
        "id": "files",
        "label": "Files or directories",
        "type": "path",
        "position": 0,
        "multiple": true,
        "path": {
          "kind": "any",
          "role": "input"
        },
        "sources": [
          "fig"
        ]
      },
      {
        "id": "autocorrect",
        "label": "Autocorrect (safe)",
        "type": "boolean",
        "option": [
          "--autocorrect",
          "-a"
        ],
        "effect": "overwrite",
        "sources": [
          "fig"
        ]
      },
      {
        "id": "autocorrect_all",
        "label": "Autocorrect (safe and unsafe)",
        "type": "boolean",
        "option": [
          "--autocorrect-all",
          "-A"
        ],
        "effect": "overwrite",
        "sources": [
          "fig"
        ]
      },
      {
        "id": "lint",
        "label": "Lint cops only",
        "type": "boolean",
        "option": [
          "--lint",
          "-l"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "only",
        "label": "Only these cops",
        "type": "string",
        "option": [
          "--only"
        ],
        "multiple": true,
        "sources": [
          "fig"
        ]
      },
      {
        "id": "except",
        "label": "Exclude these cops",
        "type": "string",
        "option": [
          "--except"
        ],
        "multiple": true,
        "sources": [
          "fig"
        ]
      },
      {
        "id": "format",
        "label": "Output formatter",
        "type": "string",
        "option": [
          "--format",
          "-f"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "config",
        "label": "Config file",
        "type": "path",
        "option": [
          "--config",
          "-c"
        ],
        "path": {
          "kind": "file",
          "role": "input"
        },
        "sources": [
          "fig"
        ]
      },
      {
        "id": "fail_level",
        "label": "Fail level",
        "type": "string",
        "option": [
          "--fail-level"
        ],
        "suggestions": [
          {
            "value": "A",
            "label": "A"
          },
          {
            "value": "I",
            "label": "I"
          },
          {
            "value": "R",
            "label": "R"
          },
          {
            "value": "C",
            "label": "C"
          },
          {
            "value": "W",
            "label": "W"
          },
          {
            "value": "E",
            "label": "E"
          },
          {
            "value": "F",
            "label": "F"
          }
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "fail_fast",
        "label": "Fail fast",
        "type": "boolean",
        "option": [
          "--fail-fast",
          "-F"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "list_target_files",
        "label": "List target files only",
        "type": "boolean",
        "option": [
          "--list-target-files",
          "-L"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "force_exclusion",
        "label": "Force configured exclusions",
        "type": "boolean",
        "option": [
          "--force-exclusion"
        ],
        "sources": [
          "fig"
        ]
      }
    ],
    "task": [
      {
        "id": "inspect",
        "label": "Inspect",
        "fields": [
          "files",
          "only",
          "except",
          "format",
          "config",
          "fail_level"
        ]
      },
      {
        "id": "fix_safe",
        "label": "Autocorrect safely",
        "fields": [
          "files",
          "autocorrect"
        ],
        "required": [
          "autocorrect"
        ],
        "set": {
          "autocorrect": [
            true
          ]
        }
      },
      {
        "id": "list",
        "label": "List files RuboCop would inspect",
        "fields": [
          "files",
          "list_target_files"
        ],
        "required": [
          "list_target_files"
        ],
        "set": {
          "list_target_files": [
            true
          ]
        }
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "files",
          "autocorrect",
          "autocorrect_all",
          "lint",
          "only",
          "except"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "format",
          "config",
          "fail_level",
          "fail_fast",
          "list_target_files",
          "force_exclusion"
        ]
      }
    ]
  }
}
