# Lint

> porticol-cli lint: check an OpenAPI document against the style rules.

Canonical: https://porticol.app/docs/cli/lint

[View as Markdown](https://porticol.app/docs/cli/lint.md)

## Usage

```
porticol-cli lint <document> [options]
```

## Lint options

| Option | What it does |
| --- | --- |
| `--rule <names>` | rule names to run, comma-separated |
| `--rules <names>` | the same, and a name ending in .yaml, .yml or .json is a rule configuration file |
| `--config <file>` | a YAML or JSON rule configuration: severities, and rules turned off |
| `-f, --format text\|json` | what to print; the default is text |
| `-r, --reporter text\|json` | the same as --format |

## Output

| Option | What it does |
| --- | --- |
| `--color <auto\|always\|never>` | colour in the report; auto is a terminal, or CLICOLOR_FORCE in the environment |
| `--no-color` | the same as --color never |
| `-q, --quiet` | the totals alone: no header, no result lines, and no notices |
| `--silent` | nothing on standard output; file reports still written |
| `--no-progress` | the results at the end rather than as they finish |
| `--verbose` | every assertion and every console line |

## Exit codes

| Code | Meaning |
| --- | --- |
| 0 | every request, assertion and threshold passed |
| 1 | an assertion, a schema check or a threshold failed, a flow stopped, or the run was stopped with Ctrl-C |
| 2 | a request could not be made |
| 3 | the command line, a file, the configuration, the token or a variable is wrong |
| 4 | the licence refused the run |
| 5 | the head document breaks the base document, at the level --fail-on names |
| 6 | the document has a lint finding of severity error |

## See also

- [this text, with examples](https://porticol.app/docs/cli.html)
- [a pipeline to copy](https://porticol.app/docs/automation.html)
