0
0
Fork 0
mirror of https://github.com/DavidAnson/markdownlint-cli2-action.git synced 2024-10-16 12:07:01 +02:00

Convert glob input to globs to support multiple globs.

This commit is contained in:
David Anson 2021-01-13 14:50:05 -08:00
parent 9a43d58805
commit a7cc7f4b06
5 changed files with 16 additions and 10 deletions

View file

@ -18,4 +18,10 @@ jobs:
- name: One glob (test/error.md, errors)
uses: ./
with:
glob: test/errors.md
globs: test/errors.md
- name: Two globs (README.md and test/error.md, errors)
uses: ./
with:
globs: |
*.md
test/*

View file

@ -5,11 +5,11 @@ Markdown/CommonMark files with the markdownlint library
## Inputs
### glob (optional)
### globs (optional)
Glob expression of files to lint
Glob expression(s) of files to lint (newline-delimited)
Default: `*.{md,markdown}`
The default `*.{md,markdown}` lints all Markdown files in the base directory
## Outputs

View file

@ -2,8 +2,8 @@ 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'
inputs:
glob:
description: 'Glob expression of files to lint'
globs:
description: 'Glob expression(s) of files to lint (newline-delimited)'
default: '*.{md,markdown}'
required: false
runs:

4
dist/index.js vendored
View file

@ -16,10 +16,10 @@ const { "main": markdownlintCli2 } = __nccwpck_require__(9202);
const logMessage = core.info;
const logError = core.error;
const glob = core.getInput("glob");
const argv = core.getInput("globs").split("\n").filter(String));
markdownlintCli2({
"argv": [ glob ],
argv,
logMessage,
logError
}).then(

View file

@ -7,10 +7,10 @@ const { "main": markdownlintCli2 } = require("markdownlint-cli2");
const logMessage = core.info;
const logError = core.error;
const glob = core.getInput("glob");
const argv = core.getInput("globs").split("\n").filter(String));
markdownlintCli2({
"argv": [ glob ],
argv,
logMessage,
logError
}).then(