{
  "id": "luacheck",
  "name": "Luacheck",
  "homepage": "https://github.com/lunarmodules/luacheck",
  "description": "A tool for linting and static analysis of Lua code.",
  "executables": [
    "luacheck"
  ],
  "dotfiles": {
    "paths": [
      "[appData]/Luacheck/.luacheckrc",
      "%LOCALAPPDATA%/Luacheck/.luacheckrc",
      "[configHome]/luacheck/.luacheckrc"
    ],
    "secret": []
  },
  "commands": {
    "format": 1,
    "label": "Lint Lua files",
    "description": "Check files or directories with luacheck. Covers the common filters and standards; formatter plugins, caching and parallel jobs are left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": false,
      "short_bundles": true
    },
    "source": [
      {
        "id": "docs",
        "kind": "manual",
        "url": "https://github.com/lunarmodules/luacheck/blob/master/docsrc/cli.rst",
        "revision": "master 2026-10-27",
        "evidence": "``-g | --no-global``                    Filter out warnings related to global variables.\n``-u | --no-unused``                    Filter out warnings related to unused variables and values.\n``-r | --no-redefined``                 Filter out warnings related to redefined variables.\n``-a | --no-unused-args``               Filter out warnings related to unused arguments and loop variables.\n``--no-self``                           Filter out warnings related to implicit ``self`` argument.\n``--std <std>``                         Set standard globals, default is ``max``. ``<std>`` can be one of:\nmax, min, lua51, lua51c, lua52, lua52c, lua53, lua53c, lua54, lua54c, luajit, ngx_lua, love, busted, rockspec, luacheckrc, ldoc, sile, none\n``--globals [<name>] ...``              Add custom global variables or fields on top of standard ones.\n``--read-globals [<name>] ...``         Add read-only global variables or fields.\n``--max-line-length <length>``          Set maximum allowed line length (default: 120).\n``--no-max-line-length``                Do not limit line length.\n``--ignore | -i <patt> [<patt>] ...``   Filter out warnings matching patterns.\n``--only | -o <patt> [<patt>] ...``     Filter out warnings not matching patterns.\n``--config <config>``                   Path to custom configuration file (default: ``.luacheckrc``).\n``--no-config``                         Do not look up custom configuration file.\n``--exclude-files <glob> [<glob>] ...`` Do not check files matching these globbing patterns.\n``--no-cache``                          Do not use cache.\n``-q | --quiet``                        Suppress report output for files without warnings.\n``--codes``                             Show warning codes.\n``--no-color``                          Do not colorize output.\n"
      }
    ],
    "field": [
      {
        "id": "files",
        "label": "Files or directories",
        "type": "path",
        "path": {
          "kind": "any",
          "role": "input"
        },
        "position": 0,
        "multiple": true,
        "sources": [
          "docs"
        ]
      },
      {
        "id": "std",
        "label": "Standard globals",
        "type": "enum",
        "option": [
          "--std"
        ],
        "choices": [
          {
            "value": "max",
            "label": "max (Lua 5.1-5.4 + LuaJIT)"
          },
          {
            "value": "min",
            "label": "min"
          },
          {
            "value": "lua51",
            "label": "Lua 5.1"
          },
          {
            "value": "lua52",
            "label": "Lua 5.2"
          },
          {
            "value": "lua53",
            "label": "Lua 5.3"
          },
          {
            "value": "lua54",
            "label": "Lua 5.4"
          },
          {
            "value": "luajit",
            "label": "LuaJIT"
          },
          {
            "value": "ngx_lua",
            "label": "OpenResty ngx_lua"
          },
          {
            "value": "love",
            "label": "LÖVE"
          },
          {
            "value": "busted",
            "label": "Busted"
          },
          {
            "value": "none",
            "label": "None"
          }
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "globals",
        "label": "Extra globals",
        "type": "string",
        "option": [
          "--globals"
        ],
        "multiple": true,
        "sources": [
          "docs"
        ]
      },
      {
        "id": "read_globals",
        "label": "Read-only globals",
        "type": "string",
        "option": [
          "--read-globals"
        ],
        "multiple": true,
        "sources": [
          "docs"
        ]
      },
      {
        "id": "no_unused",
        "label": "Hide unused-variable warnings",
        "type": "boolean",
        "option": [
          "--no-unused",
          "-u"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "no_unused_args",
        "label": "Hide unused-argument warnings",
        "type": "boolean",
        "option": [
          "--no-unused-args",
          "-a"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "no_global",
        "label": "Hide global-variable warnings",
        "type": "boolean",
        "option": [
          "--no-global",
          "-g"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "max_line_length",
        "label": "Max line length",
        "type": "integer",
        "option": [
          "--max-line-length"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "ignore",
        "label": "Ignore warnings matching",
        "description": "Warning codes or variable names.",
        "type": "string",
        "option": [
          "--ignore",
          "-i"
        ],
        "multiple": true,
        "sources": [
          "docs"
        ]
      },
      {
        "id": "exclude_files",
        "label": "Exclude files (glob)",
        "type": "string",
        "option": [
          "--exclude-files"
        ],
        "multiple": true,
        "sources": [
          "docs"
        ]
      },
      {
        "id": "config",
        "label": "Config file",
        "type": "path",
        "path": {
          "kind": "file",
          "role": "input"
        },
        "option": [
          "--config"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "codes",
        "label": "Show warning codes",
        "type": "boolean",
        "option": [
          "--codes"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "quiet",
        "label": "Quiet (hide clean files)",
        "type": "boolean",
        "option": [
          "--quiet",
          "-q"
        ],
        "sources": [
          "docs"
        ]
      },
      {
        "id": "no_color",
        "label": "No color",
        "type": "boolean",
        "option": [
          "--no-color"
        ],
        "sources": [
          "docs"
        ]
      }
    ],
    "task": [
      {
        "id": "lint",
        "label": "Lint files",
        "fields": [
          "files",
          "codes",
          "quiet"
        ],
        "required": [
          "files"
        ]
      },
      {
        "id": "lint_std",
        "label": "Lint against a standard",
        "fields": [
          "files",
          "std",
          "globals",
          "codes"
        ],
        "required": [
          "files",
          "std"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "files",
          "std",
          "globals",
          "read_globals",
          "codes",
          "quiet"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "no_unused",
          "no_unused_args",
          "no_global",
          "max_line_length",
          "ignore",
          "exclude_files",
          "config",
          "no_color"
        ]
      }
    ]
  }
}
