mirror of
https://github.com/DavidAnson/markdownlint-cli2-action.git
synced 2024-12-22 21:03:53 +01:00
Add examples for command=fix/config to README.md, tweak test name.
This commit is contained in:
parent
b20e49cfa5
commit
70a2f849be
2 changed files with 21 additions and 1 deletions
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
|
@ -58,7 +58,7 @@ jobs:
|
|||
config/test.markdownlint.jsonc
|
||||
test/*
|
||||
command-config-invalid:
|
||||
name: Command = config (invalid, fails)
|
||||
name: Command = config (invalid configuration file, fails)
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
|
20
README.md
20
README.md
|
@ -67,6 +67,26 @@ To lint specific Markdown files in a project:
|
|||
docs/*.md
|
||||
```
|
||||
|
||||
To fix supported issues when linting:
|
||||
|
||||
```yaml
|
||||
- uses: DavidAnson/markdownlint-cli2-action@v5
|
||||
with:
|
||||
command: fix
|
||||
globs: '**/*.md'
|
||||
```
|
||||
|
||||
To specify a custom configuration file:
|
||||
|
||||
```yaml
|
||||
- uses: DavidAnson/markdownlint-cli2-action@v5
|
||||
with:
|
||||
command: config
|
||||
globs: |
|
||||
config/custom.markdownlint.jsonc
|
||||
**/*.md
|
||||
```
|
||||
|
||||
To prevent linting issues from failing the workflow run:
|
||||
|
||||
```yaml
|
||||
|
|
Loading…
Reference in a new issue