Skip to content

Commit

Permalink
Add example of terminating variadic argument list with "--" to README…
Browse files Browse the repository at this point in the history
….md (fixes #312).
  • Loading branch information
DavidAnson committed Aug 14, 2022
1 parent 45bcd52 commit 33f319c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ Or run using [Docker](https://www.docker.com) and [GitHub Packages](https://gith
docker run -v $PWD:/workdir ghcr.io/igorshubovych/markdownlint-cli:latest "*.md"
```

> **Note**
> Because `--enable` and `--disable` are [variadic arguments that accept multiple values][commander-variadic], it is necessary to end the list by passing `--` before the `<files|directories|globs>` argument like so: `markdownlint --disable MD013 -- README.md`.
### Globbing

`markdownlint-cli` supports advanced globbing patterns like `**/*.md` ([more information][globprimer]).
Expand Down Expand Up @@ -149,6 +152,7 @@ MIT © Igor Shubovych

[actions-badge]: https://github.com/igorshubovych/markdownlint-cli/workflows/CI/badge.svg?branch=master
[actions-url]: https://github.com/igorshubovych/markdownlint-cli/actions?query=workflow%3ACI
[commander-variadic]: https://github.com/tj/commander.js#variadic-option
[markdownlint]: https://github.com/DavidAnson/markdownlint
[markdownlint-jsonc]: https://github.com/DavidAnson/markdownlint/blob/main/schema/.markdownlint.jsonc
[markdownlint-yaml]: https://github.com/DavidAnson/markdownlint/blob/main/schema/.markdownlint.yaml
Expand Down

0 comments on commit 33f319c

Please sign in to comment.