From a999ed789f61b21f28bd8960074d6410cf817ce3 Mon Sep 17 00:00:00 2001 From: Vadim Nifadev <36514612+nifadyev@users.noreply.github.com> Date: Wed, 23 Oct 2024 08:54:18 +0300 Subject: [PATCH] Add markdownlint-cli2 as Github Action and pre-commit hook --- .github/workflows/pr.yaml | 17 +++++++++++++++++ .pre-commit-config.yaml | 7 +++++++ 2 files changed, 24 insertions(+) create mode 100644 .github/workflows/pr.yaml create mode 100644 .pre-commit-config.yaml diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml new file mode 100644 index 0000000..4da1774 --- /dev/null +++ b/.github/workflows/pr.yaml @@ -0,0 +1,17 @@ +on: [pull_request] + +permissions: + contents: read + pull-requests: read + checks: write + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: DavidAnson/markdownlint-cli2-action@v17 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..8813a02 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,7 @@ +default_language_version: + python: python3.12 +repos: +- repo: https://github.com/DavidAnson/markdownlint-cli2 + rev: v0.14.0 + hooks: + - id: markdownlint-cli2