From d84a7fa96b6652a0ef7444ac35de356e59dd91ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20B=C3=B6sing?= <2189546+boesing@users.noreply.github.com> Date: Sat, 8 Jul 2023 00:43:29 +0200 Subject: [PATCH] feature: introduce markdown linting for `README.md` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com> --- src/tools.ts | 7 +++++++ tests/doc-linting-readme-due-diff/.laminas-ci.json | 3 +++ tests/doc-linting-readme-due-diff/README.md | 0 tests/doc-linting-readme-due-diff/matrix.json | 10 ++++++++++ tests/doc-linting-readme/.laminas-ci.json | 3 +++ tests/doc-linting-readme/README.md | 0 tests/doc-linting-readme/diff | 1 + tests/doc-linting-readme/matrix.json | 10 ++++++++++ 8 files changed, 34 insertions(+) create mode 100644 tests/doc-linting-readme-due-diff/.laminas-ci.json create mode 100644 tests/doc-linting-readme-due-diff/README.md create mode 100644 tests/doc-linting-readme-due-diff/matrix.json create mode 100644 tests/doc-linting-readme/.laminas-ci.json create mode 100644 tests/doc-linting-readme/README.md create mode 100644 tests/doc-linting-readme/diff create mode 100644 tests/doc-linting-readme/matrix.json diff --git a/src/tools.ts b/src/tools.ts index 835a476e..2178b7a9 100644 --- a/src/tools.ts +++ b/src/tools.ts @@ -64,6 +64,13 @@ export default function createTools(config: Config): Array { filesToCheck : [ 'mkdocs.yml' ], toolType : ToolType.LINTER, }, + { + executionType : ToolExecutionType.STATIC, + name : 'README Linting', + command : 'markdownlint README.md', + filesToCheck : [ 'README.md' ], + toolType : ToolType.LINTER, + }, { executionType : ToolExecutionType.MATRIX, name : 'PHPUnit', diff --git a/tests/doc-linting-readme-due-diff/.laminas-ci.json b/tests/doc-linting-readme-due-diff/.laminas-ci.json new file mode 100644 index 00000000..a912e7b6 --- /dev/null +++ b/tests/doc-linting-readme-due-diff/.laminas-ci.json @@ -0,0 +1,3 @@ +{ + "stablePHP": "7.4" +} diff --git a/tests/doc-linting-readme-due-diff/README.md b/tests/doc-linting-readme-due-diff/README.md new file mode 100644 index 00000000..e69de29b diff --git a/tests/doc-linting-readme-due-diff/matrix.json b/tests/doc-linting-readme-due-diff/matrix.json new file mode 100644 index 00000000..66f843ca --- /dev/null +++ b/tests/doc-linting-readme-due-diff/matrix.json @@ -0,0 +1,10 @@ +{ + "include": [ + { + "name": "README Linting [7.4, latest]", + "job": "{\"command\":\"markdownlint README.md\",\"php\":\"7.4\",\"extensions\":[],\"ini\":[],\"dependencies\":\"latest\",\"ignore_platform_reqs_8\":false,\"ignore_php_platform_requirement\":false,\"additional_composer_arguments\":[],\"before_script\":[]}", + "operatingSystem": "ubuntu-latest", + "action": "laminas/laminas-continuous-integration-action@v1" + } + ] +} diff --git a/tests/doc-linting-readme/.laminas-ci.json b/tests/doc-linting-readme/.laminas-ci.json new file mode 100644 index 00000000..a912e7b6 --- /dev/null +++ b/tests/doc-linting-readme/.laminas-ci.json @@ -0,0 +1,3 @@ +{ + "stablePHP": "7.4" +} diff --git a/tests/doc-linting-readme/README.md b/tests/doc-linting-readme/README.md new file mode 100644 index 00000000..e69de29b diff --git a/tests/doc-linting-readme/diff b/tests/doc-linting-readme/diff new file mode 100644 index 00000000..b43bf86b --- /dev/null +++ b/tests/doc-linting-readme/diff @@ -0,0 +1 @@ +README.md diff --git a/tests/doc-linting-readme/matrix.json b/tests/doc-linting-readme/matrix.json new file mode 100644 index 00000000..66f843ca --- /dev/null +++ b/tests/doc-linting-readme/matrix.json @@ -0,0 +1,10 @@ +{ + "include": [ + { + "name": "README Linting [7.4, latest]", + "job": "{\"command\":\"markdownlint README.md\",\"php\":\"7.4\",\"extensions\":[],\"ini\":[],\"dependencies\":\"latest\",\"ignore_platform_reqs_8\":false,\"ignore_php_platform_requirement\":false,\"additional_composer_arguments\":[],\"before_script\":[]}", + "operatingSystem": "ubuntu-latest", + "action": "laminas/laminas-continuous-integration-action@v1" + } + ] +}