From c4e571b09cdd2da46cbecabd1475732d1f3c2520 Mon Sep 17 00:00:00 2001 From: Ingo Reitz <9l@9lo.re> Date: Sun, 23 Jun 2024 04:07:36 +0200 Subject: [PATCH 1/4] Add Markdownlint workflow --- .github/workflows/md.yml | 13 +++++++++++++ .markdownlint.jsonc | 8 ++++++++ 2 files changed, 21 insertions(+) create mode 100644 .github/workflows/md.yml create mode 100644 .markdownlint.jsonc diff --git a/.github/workflows/md.yml b/.github/workflows/md.yml new file mode 100644 index 00000000..9802e3c2 --- /dev/null +++ b/.github/workflows/md.yml @@ -0,0 +1,13 @@ +name: Markdown lint +on: [pull_request] +jobs: + markdownlint: + name: markdownlint-cli + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: DavidAnson/markdownlint-cli2-action@v16 + id: linter + with: + globs: 'src/**/*.md' + config: '.markdownlint.jsonc' diff --git a/.markdownlint.jsonc b/.markdownlint.jsonc new file mode 100644 index 00000000..612ebc28 --- /dev/null +++ b/.markdownlint.jsonc @@ -0,0 +1,8 @@ +{ + "MD004": { + "style": "consistent" + }, + "MD034": false, + "MD033": false, + "MD013": false +} \ No newline at end of file From 50aa6de20e9c6897a896813302d50b99d59d444c Mon Sep 17 00:00:00 2001 From: Ingo Reitz <9l@9lo.re> Date: Sun, 23 Jun 2024 04:08:49 +0200 Subject: [PATCH 2/4] autofix some errors --- .github/workflows/md.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/md.yml b/.github/workflows/md.yml index 9802e3c2..9fbfe8f0 100644 --- a/.github/workflows/md.yml +++ b/.github/workflows/md.yml @@ -10,4 +10,5 @@ jobs: id: linter with: globs: 'src/**/*.md' - config: '.markdownlint.jsonc' + config: '.markdownlint.jsonc' + fix: true From 6fdcafd2aa6b7ac94d20d8ca44c33c3a17f3b4e9 Mon Sep 17 00:00:00 2001 From: Ingo Reitz <9l@9lo.re> Date: Tue, 9 Jul 2024 19:19:05 +0200 Subject: [PATCH 3/4] only target PR on main --- .github/workflows/md.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/md.yml b/.github/workflows/md.yml index 9fbfe8f0..a54dc1e1 100644 --- a/.github/workflows/md.yml +++ b/.github/workflows/md.yml @@ -1,5 +1,7 @@ name: Markdown lint -on: [pull_request] +on: + pull_request: + branches: main jobs: markdownlint: name: markdownlint-cli From 98396bd0dc7b4b6b0cb00c3548ecee26ae55c6b6 Mon Sep 17 00:00:00 2001 From: Ingo Reitz <9l@9lo.re> Date: Tue, 9 Jul 2024 20:04:07 +0200 Subject: [PATCH 4/4] markdownlintrc EOF newline --- .markdownlint.jsonc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.markdownlint.jsonc b/.markdownlint.jsonc index 612ebc28..2cf7f421 100644 --- a/.markdownlint.jsonc +++ b/.markdownlint.jsonc @@ -5,4 +5,4 @@ "MD034": false, "MD033": false, "MD013": false -} \ No newline at end of file +}