mirror of
https://github.com/DavidAnson/markdownlint-cli2-action.git
synced 2024-11-22 06:06:23 +01:00
Remove unnecessary quotes from YAML code/examples, standardize on single (vs. double) quotes, add test for invalid configuration file.
This commit is contained in:
parent
a82aa2ee66
commit
b20e49cfa5
3 changed files with 30 additions and 11 deletions
21
.github/workflows/test.yml
vendored
21
.github/workflows/test.yml
vendored
|
@ -20,7 +20,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: ./
|
- uses: ./
|
||||||
one-glob:
|
one-glob-file:
|
||||||
name: One glob (test/errors.md, 3 errors)
|
name: One glob (test/errors.md, 3 errors)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
@ -28,6 +28,14 @@ jobs:
|
||||||
- uses: ./
|
- uses: ./
|
||||||
with:
|
with:
|
||||||
globs: test/errors.md
|
globs: test/errors.md
|
||||||
|
one-glob-pattern:
|
||||||
|
name: One glob (*.md, 3 errors)
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: ./
|
||||||
|
with:
|
||||||
|
globs: '*.md'
|
||||||
two-globs:
|
two-globs:
|
||||||
name: Two globs (README.md and test/errors.md, 3 errors)
|
name: Two globs (README.md and test/errors.md, 3 errors)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -49,6 +57,17 @@ jobs:
|
||||||
globs: |
|
globs: |
|
||||||
config/test.markdownlint.jsonc
|
config/test.markdownlint.jsonc
|
||||||
test/*
|
test/*
|
||||||
|
command-config-invalid:
|
||||||
|
name: Command = config (invalid, fails)
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: ./
|
||||||
|
with:
|
||||||
|
command: config
|
||||||
|
globs: |
|
||||||
|
invalid.markdownlint.jsonc
|
||||||
|
test/*
|
||||||
command-config-missing:
|
command-config-missing:
|
||||||
name: Command = config (missing configuration file, fails)
|
name: Command = config (missing configuration file, fails)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
|
@ -53,7 +53,7 @@ To lint all Markdown files in a project:
|
||||||
```yaml
|
```yaml
|
||||||
- uses: DavidAnson/markdownlint-cli2-action@v5
|
- uses: DavidAnson/markdownlint-cli2-action@v5
|
||||||
with:
|
with:
|
||||||
globs: "**/*.md"
|
globs: '**/*.md'
|
||||||
```
|
```
|
||||||
|
|
||||||
To lint specific Markdown files in a project:
|
To lint specific Markdown files in a project:
|
||||||
|
|
18
action.yml
18
action.yml
|
@ -1,18 +1,18 @@
|
||||||
name: 'markdownlint-cli2-action'
|
name: markdownlint-cli2-action
|
||||||
author: 'David Anson'
|
author: David Anson
|
||||||
description: 'A GitHub Action to run the markdownlint-cli2 tool for linting Markdown/CommonMark files with the markdownlint library'
|
description: A GitHub Action to run the markdownlint-cli2 tool for linting Markdown/CommonMark files with the markdownlint library
|
||||||
branding:
|
branding:
|
||||||
icon: 'check-square'
|
icon: check-square
|
||||||
color: 'orange'
|
color: orange
|
||||||
inputs:
|
inputs:
|
||||||
command:
|
command:
|
||||||
description: 'Command to run (unset, "fix", or "config")'
|
description: Command to run (unset, "fix", or "config")
|
||||||
default: ''
|
default: ''
|
||||||
required: false
|
required: false
|
||||||
globs:
|
globs:
|
||||||
description: 'Glob expression(s) of files to lint (newline-delimited)'
|
description: Glob expression(s) of files to lint (newline-delimited)
|
||||||
default: '*.{md,markdown}'
|
default: '*.{md,markdown}'
|
||||||
required: false
|
required: false
|
||||||
runs:
|
runs:
|
||||||
using: 'node16'
|
using: node16
|
||||||
main: 'dist/index.js'
|
main: dist/index.js
|
||||||
|
|
Loading…
Reference in a new issue