0
0
Fork 0
mirror of https://github.com/DavidAnson/markdownlint-cli2-action.git synced 2024-11-23 06:36:25 +01:00

Remove "command" input deprecated in v11.

This commit is contained in:
David Anson 2023-11-21 14:22:00 -08:00
parent b1a3c7b349
commit 1e5b6609c9
6 changed files with 24 additions and 147 deletions

View file

@ -1,5 +1,7 @@
CommonMark
config
LLMs
markdownlint-cli2-action
npm
README
truthy

View file

@ -69,70 +69,6 @@ jobs:
id: test
- run: exit 1
if: steps.test.outcome != 'failure'
command-config:
name: Command = config (test/errors.md, 2 errors)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: rm .markdownlint.json
- uses: ./
with:
command: config
globs: |
config/test.markdownlint.jsonc
test/*
continue-on-error: true
id: test
- run: exit 1
if: steps.test.outcome != 'failure'
command-config-invalid:
name: Command = config (invalid configuration file, fails)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./
with:
command: config
globs: |
invalid.markdownlint.jsonc
test/*
continue-on-error: true
id: test
- run: exit 1
if: steps.test.outcome != 'failure'
command-config-missing:
name: Command = config (missing configuration file, fails)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./
with:
command: config
continue-on-error: true
id: test
- run: exit 1
if: steps.test.outcome != 'failure'
command-fix:
name: Command = fix (test/errors.md, 0 errors)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./
with:
command: fix
globs: 'test/*'
command-unsupported:
name: Command = unsupported (fails)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./
with:
command: unsupported
continue-on-error: true
id: test
- run: exit 1
if: steps.test.outcome != 'failure'
config:
name: config (test/errors.md, 2 errors)
runs-on: ubuntu-latest

View file

@ -13,22 +13,6 @@ information.
## Inputs
### command (optional)
> **Deprecated in favor of the "fix" and "config" inputs**
>
> Command to run (unset, `fix`, or `config`)
>
> If unspecified or `""`, the `markdownlint-cli2` command is run.
>
> If set to `fix`, the `markdownlint-cli2-fix` command is run and supported
> issues will be fixed automatically.
>
> If set to `config`, the `markdownlint-cli2-config` command is run and the
> first element of `globs` should specify a supported configuration file.
>
> For more detail: [documentation for `markdownlint-cli2`][command-line].
### config (optional)
Path of a file to use for the base configuration object (defaults to none)

View file

@ -5,11 +5,6 @@ branding:
icon: check-square
color: orange
inputs:
command:
description: Command to run (unset, "fix", or "config")
deprecationMessage: This input is deprecated in favor of the "fix" and "config" inputs
default: ''
required: false
config:
description: Path of a file to use for the base configuration object (defaults to none)
default: ''

20
dist/index.js vendored
View file

@ -58908,25 +58908,6 @@ if (fix) {
argv.push("--fix");
}
let invoke = true;
const command = core.getInput("command");
switch (command) {
case "":
// Default behavior
break;
case "config":
argv.unshift("--config");
break;
case "fix":
argv.unshift("--fix");
break;
default:
core.setFailed(`Unsupported command: ${command}`);
invoke = false;
break;
}
if (invoke) {
const parameters = {
argv,
logMessage,
@ -58938,7 +58919,6 @@ if (invoke) {
(code) => code && core.setFailed(`Failed with exit code: ${code}`),
(error) => core.setFailed(`Failed due to error: ${error}`)
);
}
})();

View file

@ -60,25 +60,6 @@ if (fix) {
argv.push("--fix");
}
let invoke = true;
const command = core.getInput("command");
switch (command) {
case "":
// Default behavior
break;
case "config":
argv.unshift("--config");
break;
case "fix":
argv.unshift("--fix");
break;
default:
core.setFailed(`Unsupported command: ${command}`);
invoke = false;
break;
}
if (invoke) {
const parameters = {
argv,
logMessage,
@ -90,4 +71,3 @@ if (invoke) {
(code) => code && core.setFailed(`Failed with exit code: ${code}`),
(error) => core.setFailed(`Failed due to error: ${error}`)
);
}