# Zuplo CLI: Lint

<CliCommand
  command="lint"
  description="Lints your OpenAPI specs and policies for errors and Zuplo conventions"
  options={[
  {
    "name": "dir",
    "type": "string",
    "description": "The directory containing your Zuplo API",
    "default": ".",
    "required": false,
    "deprecated": false,
    "hidden": false,
    "normalize": true
  },
  {
    "name": "config",
    "type": "string",
    "description": "Path to a lint config file. Defaults to zuplo.lint.jsonc or zuplo.lint.json in the project directory.",
    "required": false,
    "deprecated": false,
    "hidden": false,
    "normalize": true
  },
  {
    "name": "format",
    "type": "string",
    "description": "Output format",
    "default": "text",
    "required": false,
    "deprecated": false,
    "hidden": false,
    "choices": [
      "text",
      "json",
      "sarif"
    ]
  },
  {
    "name": "fail-on",
    "type": "string",
    "description": "Severity threshold that fails the command. Defaults to the failOn value in your lint config, or 'error'.",
    "required": false,
    "deprecated": false,
    "hidden": false,
    "choices": [
      "error",
      "warn",
      "none"
    ]
  },
  {
    "name": "lint-binary",
    "type": "string",
    "description": "Path to a zuplo-lint executable to use instead of the one installed with the CLI",
    "required": false,
    "deprecated": false,
    "hidden": true,
    "normalize": true
  },
  {
    "name": "fix",
    "type": "boolean",
    "description": "Rewrite your OpenAPI files to fix what can be fixed automatically, then report what is left",
    "default": false,
    "required": false,
    "deprecated": false,
    "hidden": false
  }
]}
  examples={[
  [
    "$0 lint",
    "Lint the project in the current directory"
  ],
  [
    "$0 lint --fix",
    "Apply the fixes that can be made automatically"
  ],
  [
    "$0 lint --fail-on warn",
    "Fail the command on warnings as well as errors"
  ],
  [
    "$0 lint --format sarif > results.sarif",
    "Emit SARIF for GitHub Code Scanning"
  ]
]}
  usage="$0 lint [options]"
>

</CliCommand>

## Global options

The following global options are available for all commands:

- [`--help`](./global-options.mdx#help)
- [`--api-key`](./global-options.mdx#api-key)
