mirror of
https://github.com/DavidAnson/markdownlint-cli2-action.git
synced 2026-09-01 09:40:44 +02:00
Convert glob input to globs to support multiple globs.
This commit is contained in:
@@ -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/*
|
||||
@@ -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
|
||||
|
||||
|
||||
+2
-2
@@ -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:
|
||||
|
||||
Vendored
+2
-2
@@ -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(
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user