Skip to content

Commit

Permalink
Add documentation regarding how to specify options
Browse files Browse the repository at this point in the history
  • Loading branch information
rasshofer committed Mar 4, 2018
1 parent 07f542b commit 547f5e0
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,31 @@ yamllint test.yaml

## Options

YAML Lint is configured using the following options via a configuration file, environment variables, and/or command-line arguments.

First of all, YAML Lint looks for a JSON file called `yaml-lint.json` within the current working directory.

```json
{
"schema": "CORE_SCHEMA",
"ignore": "dir/*.yaml"
}
```

Afterwards, YAML Lint will take environment variables into account.

```shell
YAMLLINT_SCHEMA=CORE_SCHEMA YAMLLINT_IGNORE=dir/*.yaml yamllint
```

Concluding, YAML Lint will take command-line arguments into account.

```shell
yamllint --schema=CORE_SCHEMA --ignore=dir/*.yaml
```

(All options are merged into a single configuration using the hierarchy described above.)

### `schema` (string)

> Specifies a schema to use
Expand Down

0 comments on commit 547f5e0

Please sign in to comment.