# `jadpo check`

Check the project for errors.

Check every Jadpo file in the project: where each file sits, how things are named, what each name refers to and who may use it, types, logic and failures. Then write the manifest and the catalogues to build/, errors or not. Without a path, the project is found by walking up to app.jadpo. A file or folder outside any project is checked on its own, with the layout rules off, and writes nothing.

```text
jadpo check [path]
```

## Arguments

- `path` (optional): A project, file or folder to check

## On every command

- `--json`: Print data for tools instead of text
- `--help`: Show every flag, with examples
- `--color <when>`: Choose when to use colour

`jadpo check --json` writes one JSON document to standard output instead of text, with the same exit code. The document has `schemaVersion`, `command` (`"check"`), `ok`, `data` (what the command produced, `null` when it failed) and `diagnostics` (each error with its `rule`, `reason`, `next` and `help`). A command that needs a terminal refuses `--json` and names the flags that do the same job.

## Examples

```text
# Check the project you are in
jadpo check
# Check one file on its own
jadpo check main.jadpo
# Print the problems as data for tools
jadpo check --json
```

## Errors

- [`cli.check_arguments`](../errors/cli.check_arguments.md): Check command has invalid arguments
