From 643ba9fa07318493cdbac9b322c3024be4fbb331 Mon Sep 17 00:00:00 2001 From: Kevin Deldycke Date: Fri, 23 Oct 2020 10:17:07 +0200 Subject: [PATCH] Lint YAML. --- .github/markdown-lint.yaml | 12 ++++++++---- .github/workflows/autofix.yaml | 11 +++++++---- .github/workflows/autolock.yaml | 1 + .github/workflows/labels_sync.yaml | 11 ++++++----- .github/workflows/lint.yaml | 13 +++++++------ 5 files changed, 29 insertions(+), 19 deletions(-) diff --git a/.github/markdown-lint.yaml b/.github/markdown-lint.yaml index 48e3633..f440ae2 100644 --- a/.github/markdown-lint.yaml +++ b/.github/markdown-lint.yaml @@ -1,11 +1,15 @@ -# See example at: https://github.com/avto-dev/markdown-lint/blob/master/lint/config/changelog.yml - -# Line length +# See example at: +# https://github.com/avto-dev/markdown-lint/blob/master/lint/config +# /changelog.yml +--- +# Line length +# https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md013 # XXX Temporary disabled because of line continuation edge-case. See: # https://github.com/DavidAnson/markdownlint/issues/302 MD013: false -# Inline HTML +# Inline HTML +# https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md033 # is allowed for beautiful rendering on GitHub. MD033: # Whitelist elements used to render centered images and footnotes on GitHub. diff --git a/.github/workflows/autofix.yaml b/.github/workflows/autofix.yaml index 74e3a91..61c8ec9 100644 --- a/.github/workflows/autofix.yaml +++ b/.github/workflows/autofix.yaml @@ -1,5 +1,6 @@ +--- name: Autofix -on: +"on": push: # Only targets default branch to avoid amplification effects of # auto-fixing the exact same stuff in multiple non-rebased branches. @@ -27,9 +28,11 @@ jobs: # https://github.com/thlorenz/doctoc/pull/145 doctoc --github --title "## Contents" readme.md - name: Remove forbidden special TOC entries - # See: https://github.com/sindresorhus/awesome-lint/blob/v0.16.0/rules/toc.js#L15-L18 - run: | - gawk -i inplace '!/^- \[(Contributing|Footnotes)\]\(#.+\)$/{print}' ./readme.md + # See: https://github.com/sindresorhus/awesome-lint/blob/v0.16.0/rules + # /toc.js#L15-L18 + run: > + gawk -i inplace '!/^- \[(Contributing|Footnotes)\]\(#.+\)$/{print}' + ./readme.md - name: Commit and push changes uses: stefanzweifel/git-auto-commit-action@v4.7.1 with: diff --git a/.github/workflows/autolock.yaml b/.github/workflows/autolock.yaml index 622478f..109dde6 100644 --- a/.github/workflows/autolock.yaml +++ b/.github/workflows/autolock.yaml @@ -1,5 +1,6 @@ # Locks closed issues and pull requests after a period of inactivity, to # prevent spam and noise. +--- name: Autolock "on": schedule: diff --git a/.github/workflows/labels_sync.yaml b/.github/workflows/labels_sync.yaml index 87072fa..33b6540 100644 --- a/.github/workflows/labels_sync.yaml +++ b/.github/workflows/labels_sync.yaml @@ -1,5 +1,6 @@ +--- name: Sync labels -on: issues +"on": issues jobs: @@ -7,7 +8,7 @@ jobs: name: Sync labels runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2.3.3 - - uses: lannonbr/issue-label-manager-action@2.0.0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - uses: actions/checkout@v2.3.3 + - uses: lannonbr/issue-label-manager-action@2.0.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 7176d5c..ae56e46 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -1,5 +1,6 @@ +--- name: Lint -on: +"on": push: pull_request: schedule: @@ -12,11 +13,11 @@ jobs: name: Lint markdown runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2.3.3 - - uses: avto-dev/markdown-lint@v1.4.0 - with: - config: '.github/markdown-lint.yaml' - args: './**/*.md' + - uses: actions/checkout@v2.3.3 + - uses: avto-dev/markdown-lint@v1.4.0 + with: + config: '.github/markdown-lint.yaml' + args: './**/*.md' lint-awesome: name: Lint Awesome list