From 30d70e6c828955bf10553b003aa420444c462ccf Mon Sep 17 00:00:00 2001 From: iamtodor Date: Fri, 1 Jul 2022 20:18:55 +0200 Subject: [PATCH] add markdown linter --- .github/workflows/markdown_lint.yml | 2 +- .github/workflows/markdown_linter_checks.yml | 27 ++++++++++++++++++++ .github/workflows/markdown_linter_rules.rb | 16 ++++++++++++ 3 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/markdown_linter_checks.yml create mode 100644 .github/workflows/markdown_linter_rules.rb diff --git a/.github/workflows/markdown_lint.yml b/.github/workflows/markdown_lint.yml index 57394e0d..2fbc480b 100644 --- a/.github/workflows/markdown_lint.yml +++ b/.github/workflows/markdown_lint.yml @@ -16,7 +16,7 @@ jobs: markdown-link-check: runs-on: ubuntu-latest steps: - - name: Checkout + - name: checkout uses: actions/checkout@v3 with: submodules: recursive diff --git a/.github/workflows/markdown_linter_checks.yml b/.github/workflows/markdown_linter_checks.yml new file mode 100644 index 00000000..6b9075bf --- /dev/null +++ b/.github/workflows/markdown_linter_checks.yml @@ -0,0 +1,27 @@ +name: markdown-linter + +on: + push: + branches: + - master + - main + paths: + - "**.md" + - ".github/workflows/markdown_linter_rules.yml" + - ".github/workflows/markdown_linter_checks.yml" +permissions: + contents: read +jobs: + markdown-lint: + name: Lint repository + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: "3.1" + - name: Install mdl + run: gem install mdl + - name: Run markdown-linter + run: mdl -s .github/workflows/markdown_linter_rules.rb docs/. \ No newline at end of file diff --git a/.github/workflows/markdown_linter_rules.rb b/.github/workflows/markdown_linter_rules.rb new file mode 100644 index 00000000..625aaeeb --- /dev/null +++ b/.github/workflows/markdown_linter_rules.rb @@ -0,0 +1,16 @@ +all +exclude_rule 'MD001' +exclude_rule 'MD004' +exclude_rule 'MD007' +exclude_rule 'MD009' +exclude_rule 'MD012' +exclude_rule 'MD013' +exclude_rule 'MD022' +exclude_rule 'MD024' +exclude_rule 'MD026' +exclude_rule 'MD029' +exclude_rule 'MD032' +exclude_rule 'MD033' +exclude_rule 'MD034' +exclude_rule 'MD036' +# rule 'MD029', :style => 'ordered' \ No newline at end of file