From 77041dca48133e033090929d314c747525f1093e Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Fri, 6 Sep 2024 22:23:24 +0400 Subject: [PATCH] Add Yaml and MD linting --- .github/workflows/coding-standards.yml | 34 ++++++++++++++++++++++++++ .markdownlint.json | 7 ++++++ 2 files changed, 41 insertions(+) create mode 100644 .markdownlint.json diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml index 3e6ebf6..b21e3b7 100644 --- a/.github/workflows/coding-standards.yml +++ b/.github/workflows/coding-standards.yml @@ -11,6 +11,40 @@ on: # yamllint disable-line rule:truthy name: ๐Ÿงน Fix PHP coding standards jobs: + yaml-linting: + timeout-minutes: 4 + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: read + steps: + - name: ๐Ÿ“ฆ Check out the codebase + uses: actions/checkout@v4.1.6 + + - name: ๐Ÿง Lint YAML files + uses: ibiqlik/action-yamllint@v3.1.1 + with: + config_file: .github/.yamllint.yaml + file_or_dir: '.' + strict: true + + markdown-linting: + timeout-minutes: 4 + runs-on: ubuntu-latest + concurrency: + cancel-in-progress: true + group: markdown-linting-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + steps: + - name: ๐Ÿ“ฆ Check out the codebase + uses: actions/checkout@v4.1.6 + + - name: ๐Ÿง Lint Markdown files + uses: DavidAnson/markdownlint-cli2-action@v16.0.0 + with: + globs: | + **/*.md + !CHANGELOG.md + coding-standards: timeout-minutes: 4 runs-on: ${{ matrix.os }} diff --git a/.markdownlint.json b/.markdownlint.json new file mode 100644 index 0000000..77f382d --- /dev/null +++ b/.markdownlint.json @@ -0,0 +1,7 @@ +{ + "$schema": "https://raw.githubusercontent.com/DavidAnson/markdownlint/main/schema/markdownlint-config-schema.json", + "line-length": false, + "no-inline-html": false, + "first-line-h1": false, + "no-duplicate-heading": false +}