From 1575f4cf8c263886fbdce4d1ed02dc4adec842fc Mon Sep 17 00:00:00 2001 From: Jonatan Asketorp <2598631+k3KAW8Pnf7mkmdSMPHz27@users.noreply.github.com> Date: Wed, 24 Mar 2021 16:08:55 -0400 Subject: [PATCH 1/9] Add GitHub action checking links in .md files --- .github/workflows/check-links.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/workflows/check-links.yml diff --git a/.github/workflows/check-links.yml b/.github/workflows/check-links.yml new file mode 100644 index 00000000000..1812c57f445 --- /dev/null +++ b/.github/workflows/check-links.yml @@ -0,0 +1,16 @@ +name: Check Markdown links + +on: + push: + paths: + - '**.md' + +jobs: + markdown-link-check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - uses: gaurav-nelson/github-action-markdown-link-check@v1 + with: + use-quiet-mode: 'yes' + use-verbose-mode: 'no' From ff60dfddfe934fc834e5f4b5e2697c01555ba33a Mon Sep 17 00:00:00 2001 From: Jonatan Asketorp <2598631+k3KAW8Pnf7mkmdSMPHz27@users.noreply.github.com> Date: Wed, 24 Mar 2021 18:23:04 -0400 Subject: [PATCH 2/9] Add ignore list --- .github/workflows/check-links.yml | 1 + markdown-link-check-config.json | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 markdown-link-check-config.json diff --git a/.github/workflows/check-links.yml b/.github/workflows/check-links.yml index 1812c57f445..3f254f3f514 100644 --- a/.github/workflows/check-links.yml +++ b/.github/workflows/check-links.yml @@ -14,3 +14,4 @@ jobs: with: use-quiet-mode: 'yes' use-verbose-mode: 'no' + config-file: 'markdown-link-check-config.json' diff --git a/markdown-link-check-config.json b/markdown-link-check-config.json new file mode 100644 index 00000000000..18cb8dbf85a --- /dev/null +++ b/markdown-link-check-config.json @@ -0,0 +1,10 @@ +{ + "ignorePatterns": [ + { + "pattern": "brigade-project-index/settings/secrets" + }, + { + "pattern": "^https://github.com/codefornola$" + } + ] +} \ No newline at end of file From 6c71dcfa062ae4192cf44c196059ced9561a7223 Mon Sep 17 00:00:00 2001 From: Jonatan Asketorp <2598631+k3KAW8Pnf7mkmdSMPHz27@users.noreply.github.com> Date: Wed, 24 Mar 2021 18:45:47 -0400 Subject: [PATCH 3/9] Fix ignore list not loading --- .github/workflows/check-links.yml | 1 - markdown-link-check-config.json => mlc_config.json | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) rename markdown-link-check-config.json => mlc_config.json (98%) diff --git a/.github/workflows/check-links.yml b/.github/workflows/check-links.yml index 3f254f3f514..1812c57f445 100644 --- a/.github/workflows/check-links.yml +++ b/.github/workflows/check-links.yml @@ -14,4 +14,3 @@ jobs: with: use-quiet-mode: 'yes' use-verbose-mode: 'no' - config-file: 'markdown-link-check-config.json' diff --git a/markdown-link-check-config.json b/mlc_config.json similarity index 98% rename from markdown-link-check-config.json rename to mlc_config.json index 18cb8dbf85a..ca20d47fa78 100644 --- a/markdown-link-check-config.json +++ b/mlc_config.json @@ -7,4 +7,4 @@ "pattern": "^https://github.com/codefornola$" } ] -} \ No newline at end of file +} From 6459846a11f2501efc4a7647085375ece401fe27 Mon Sep 17 00:00:00 2001 From: Jonatan Asketorp <2598631+k3KAW8Pnf7mkmdSMPHz27@users.noreply.github.com> Date: Fri, 26 Mar 2021 16:38:37 -0400 Subject: [PATCH 4/9] Fix configurations not loading --- .github/workflows/check-links.yml | 1 + mlc_config.json => markdown-link-check-configuration.json | 0 2 files changed, 1 insertion(+) rename mlc_config.json => markdown-link-check-configuration.json (100%) diff --git a/.github/workflows/check-links.yml b/.github/workflows/check-links.yml index 1812c57f445..c84aab92584 100644 --- a/.github/workflows/check-links.yml +++ b/.github/workflows/check-links.yml @@ -14,3 +14,4 @@ jobs: with: use-quiet-mode: 'yes' use-verbose-mode: 'no' + config-file: './markdown-link-check-configuration.json' diff --git a/mlc_config.json b/markdown-link-check-configuration.json similarity index 100% rename from mlc_config.json rename to markdown-link-check-configuration.json From f76bd2e989c8450dff16474deb2e8b37018b0099 Mon Sep 17 00:00:00 2001 From: Jonatan Asketorp <2598631+k3KAW8Pnf7mkmdSMPHz27@users.noreply.github.com> Date: Fri, 26 Mar 2021 16:40:31 -0400 Subject: [PATCH 5/9] Fixes which files are searched for broken links --- .github/workflows/check-links.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/check-links.yml b/.github/workflows/check-links.yml index c84aab92584..9fbc503e13d 100644 --- a/.github/workflows/check-links.yml +++ b/.github/workflows/check-links.yml @@ -15,3 +15,5 @@ jobs: use-quiet-mode: 'yes' use-verbose-mode: 'no' config-file: './markdown-link-check-configuration.json' + folder-path: './docs' + file-path: './README.md' From 43c3d3ed02ad4c2edb128c497d02b2b089d7a9d5 Mon Sep 17 00:00:00 2001 From: Jonatan Asketorp <2598631+k3KAW8Pnf7mkmdSMPHz27@users.noreply.github.com> Date: Fri, 26 Mar 2021 16:42:31 -0400 Subject: [PATCH 6/9] Reverts which files are searched for broken links --- .github/workflows/check-links.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/check-links.yml b/.github/workflows/check-links.yml index 9fbc503e13d..c84aab92584 100644 --- a/.github/workflows/check-links.yml +++ b/.github/workflows/check-links.yml @@ -15,5 +15,3 @@ jobs: use-quiet-mode: 'yes' use-verbose-mode: 'no' config-file: './markdown-link-check-configuration.json' - folder-path: './docs' - file-path: './README.md' From ac798a9661279b58b3868893720e5e7260e13916 Mon Sep 17 00:00:00 2001 From: Jonatan Asketorp <2598631+k3KAW8Pnf7mkmdSMPHz27@users.noreply.github.com> Date: Fri, 26 Mar 2021 17:33:30 -0400 Subject: [PATCH 7/9] Add markdown linter --- .github/workflows/check-links.yml | 14 +++- markdown-linter-configuration.yml | 135 ++++++++++++++++++++++++++++++ 2 files changed, 148 insertions(+), 1 deletion(-) create mode 100644 markdown-linter-configuration.yml diff --git a/.github/workflows/check-links.yml b/.github/workflows/check-links.yml index c84aab92584..9e4d0d60b3b 100644 --- a/.github/workflows/check-links.yml +++ b/.github/workflows/check-links.yml @@ -7,6 +7,7 @@ on: jobs: markdown-link-check: + name: Markdown link check runs-on: ubuntu-latest steps: - uses: actions/checkout@master @@ -14,4 +15,15 @@ jobs: with: use-quiet-mode: 'yes' use-verbose-mode: 'no' - config-file: './markdown-link-check-configuration.json' + config-file: './markdown-link-check-config.json' + lint-changelog: + name: Markdown linter + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v2 + - name: Markdown linter + uses: docker://avtodev/markdown-lint:v1 + with: + config: './markdown-linter-configuration.yml' + args: '**/*.md' # This is a glob diff --git a/markdown-linter-configuration.yml b/markdown-linter-configuration.yml new file mode 100644 index 00000000000..3ca3366a0a6 --- /dev/null +++ b/markdown-linter-configuration.yml @@ -0,0 +1,135 @@ +default: false # includes/excludes all rules by default + +# Heading levels should only increment by one level at a time +MD001: true + +# Heading style +MD003: true + +# Unordered list style +MD004: true + +# Inconsistent indentation for list items at the same level +MD005: true + +# Consider starting bulleted lists at the beginning of the line +MD006: true + +# Unordered list indentation +MD007: true + +# Trailing spaces +MD009: true + +# Hard tabs +MD010: true + +# Reversed link syntax +MD011: true + +# Multiple consecutive blank lines +MD012: true + +# Line length +MD013: false + +# Dollar signs used before commands without showing output +MD014: false + +# No space after hash on atx style heading +MD018: true + +# Multiple spaces after hash on atx style heading +MD019: true + +# No space inside hashes on closed atx style heading +MD020: true + +# Multiple spaces inside hashes on closed atx style heading +MD021: true + +# Headings should be surrounded by blank lines +MD022: true + +# Headings must start at the beginning of the line +MD023: true + +# Multiple headings with the same content +MD024: + allow_different_nesting: true + +# Multiple top level headings in the same document +MD025: true + +# Trailing punctuation in heading +MD026: true + +# Multiple spaces after blockquote symbol +MD027: true + +# Blank line inside blockquote +MD028: false + +# Ordered list item prefix +MD029: + style: 'one' + +# Spaces after list markers +MD030: true + +# Fenced code blocks should be surrounded by blank lines +MD031: true + +# Lists should be surrounded by blank lines +MD032: true + +# Inline HTML +MD033: true + +# Bare URL used +MD034: true + +# Horizontal rule style +MD035: + style: '---' + +# Emphasis used instead of a heading +MD036: true + +# Spaces inside emphasis markers +MD037: true + +# Spaces inside code span elements +MD038: true + +# Spaces inside link text +MD039: true + +# Fenced code blocks should have a language specified +MD040: true + +# First line in file should be a top level heading +MD041: true + +# No empty links +MD042: true + +# Required heading structure +MD043: false + +# Proper names should have the correct capitalization +MD044: false + +# Images should have alternate text (alt text) +MD045: false + +# Code block style +MD046: + style: 'fenced' + +# Files should end with a single newline character +MD047: true + +# Code fence style +MD048: + style: 'backtick' From 0fb3732e37082ee83b0496b20c74abaa3d15ff47 Mon Sep 17 00:00:00 2001 From: Jonatan Asketorp <2598631+k3KAW8Pnf7mkmdSMPHz27@users.noreply.github.com> Date: Sat, 10 Apr 2021 12:42:33 -0400 Subject: [PATCH 8/9] Disable some markdown linter rules MD 001, 009, 022, and 047 all seem to strict for this project --- markdown-linter-configuration.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/markdown-linter-configuration.yml b/markdown-linter-configuration.yml index 3ca3366a0a6..d87ba7b0019 100644 --- a/markdown-linter-configuration.yml +++ b/markdown-linter-configuration.yml @@ -1,7 +1,7 @@ default: false # includes/excludes all rules by default # Heading levels should only increment by one level at a time -MD001: true +MD001: false # Heading style MD003: true @@ -19,7 +19,7 @@ MD006: true MD007: true # Trailing spaces -MD009: true +MD009: false # Hard tabs MD010: true @@ -49,7 +49,7 @@ MD020: true MD021: true # Headings should be surrounded by blank lines -MD022: true +MD022: false # Headings must start at the beginning of the line MD023: true @@ -128,7 +128,7 @@ MD046: style: 'fenced' # Files should end with a single newline character -MD047: true +MD047: false # Code fence style MD048: From e05d436c267002e8c7fe3da5865e10a5104069a7 Mon Sep 17 00:00:00 2001 From: Jonatan Asketorp <2598631+k3KAW8Pnf7mkmdSMPHz27@users.noreply.github.com> Date: Wed, 21 Apr 2021 19:13:22 -0400 Subject: [PATCH 9/9] Remove `codefornola` from ignore-list --- markdown-link-check-configuration.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/markdown-link-check-configuration.json b/markdown-link-check-configuration.json index ca20d47fa78..408432f3fa6 100644 --- a/markdown-link-check-configuration.json +++ b/markdown-link-check-configuration.json @@ -2,9 +2,6 @@ "ignorePatterns": [ { "pattern": "brigade-project-index/settings/secrets" - }, - { - "pattern": "^https://github.com/codefornola$" } ] }