0
0
Fork 0
mirror of https://github.com/DavidAnson/markdownlint-cli2-action.git synced 2024-10-16 12:07:01 +02: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:
David Anson 2022-07-23 13:28:59 -07:00
parent a82aa2ee66
commit b20e49cfa5
3 changed files with 30 additions and 11 deletions

View file

@ -20,7 +20,7 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: ./
one-glob:
one-glob-file:
name: One glob (test/errors.md, 3 errors)
runs-on: ubuntu-latest
steps:
@ -28,6 +28,14 @@ jobs:
- uses: ./
with:
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:
name: Two globs (README.md and test/errors.md, 3 errors)
runs-on: ubuntu-latest
@ -49,6 +57,17 @@ jobs:
globs: |
config/test.markdownlint.jsonc
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:
name: Command = config (missing configuration file, fails)
runs-on: ubuntu-latest

View file

@ -53,7 +53,7 @@ To lint all Markdown files in a project:
```yaml
- uses: DavidAnson/markdownlint-cli2-action@v5
with:
globs: "**/*.md"
globs: '**/*.md'
```
To lint specific Markdown files in a project:

View file

@ -1,18 +1,18 @@
name: 'markdownlint-cli2-action'
author: 'David Anson'
description: 'A GitHub Action to run the markdownlint-cli2 tool for linting Markdown/CommonMark files with the markdownlint library'
name: markdownlint-cli2-action
author: David Anson
description: A GitHub Action to run the markdownlint-cli2 tool for linting Markdown/CommonMark files with the markdownlint library
branding:
icon: 'check-square'
color: 'orange'
icon: check-square
color: orange
inputs:
command:
description: 'Command to run (unset, "fix", or "config")'
description: Command to run (unset, "fix", or "config")
default: ''
required: false
globs:
description: 'Glob expression(s) of files to lint (newline-delimited)'
description: Glob expression(s) of files to lint (newline-delimited)
default: '*.{md,markdown}'
required: false
runs:
using: 'node16'
main: 'dist/index.js'
using: node16
main: dist/index.js