From a03e348a90f67738bc8085fa22f97cd93d10b1c0 Mon Sep 17 00:00:00 2001 From: Edward Firmo <94725493+edwardtfn@users.noreply.github.com> Date: Thu, 11 Jan 2024 17:23:10 +0100 Subject: [PATCH] Lint --- .github/workflows/validate_blueprint.yml | 3 ++ .github/workflows/validate_esphome.yml | 3 ++ .github/workflows/validate_esphome_beta.yml | 3 ++ .github/workflows/validate_markdown.yml | 57 +++++++++++---------- 4 files changed, 39 insertions(+), 27 deletions(-) diff --git a/.github/workflows/validate_blueprint.yml b/.github/workflows/validate_blueprint.yml index 6a3aaa3..a3ad7bf 100644 --- a/.github/workflows/validate_blueprint.yml +++ b/.github/workflows/validate_blueprint.yml @@ -1,5 +1,7 @@ +--- name: Validate Blueprint YAML +# yamllint disable-line rule:truthy on: push: paths: @@ -19,3 +21,4 @@ jobs: - uses: actions/checkout@v4.1.0 - name: Validate nspanel_blueprint.yaml run: yamllint -c "./.rules/yamllint.yml" nspanel_blueprint.yaml +... diff --git a/.github/workflows/validate_esphome.yml b/.github/workflows/validate_esphome.yml index c398a3c..2ef1f42 100644 --- a/.github/workflows/validate_esphome.yml +++ b/.github/workflows/validate_esphome.yml @@ -1,5 +1,7 @@ +--- name: Validate ESPHome +# yamllint disable-line rule:truthy on: push: paths: @@ -150,3 +152,4 @@ jobs: uses: esphome/build-action@v1.8.0 with: yaml_file: "./.test/esphome_advanced_climate_heat_customizations.yaml" +... diff --git a/.github/workflows/validate_esphome_beta.yml b/.github/workflows/validate_esphome_beta.yml index ab9ed5e..4151317 100644 --- a/.github/workflows/validate_esphome_beta.yml +++ b/.github/workflows/validate_esphome_beta.yml @@ -1,5 +1,7 @@ +--- name: Validate ESPHome (beta) +# yamllint disable-line rule:truthy on: workflow_dispatch: @@ -151,3 +153,4 @@ jobs: with: yaml_file: "./.test/esphome_advanced_climate_heat_customizations.yaml" version: beta +... diff --git a/.github/workflows/validate_markdown.yml b/.github/workflows/validate_markdown.yml index 2a60d11..c3bc8c0 100644 --- a/.github/workflows/validate_markdown.yml +++ b/.github/workflows/validate_markdown.yml @@ -1,5 +1,7 @@ +--- name: Validate Markdown +# yamllint disable-line rule:truthy on: pull_request: paths: @@ -14,37 +16,38 @@ jobs: name: Markdown Lint runs-on: ubuntu-latest steps: - - name: Check out code - uses: actions/checkout@v4.1.0 + - name: Check out code + uses: actions/checkout@v4.1.0 - # https://github.com/marketplace/actions/markdownlint-cli2-action - - name: Identify changed files - uses: tj-actions/changed-files@v41 - id: changed-files - with: - files: '**/*.md' - separator: "," - # https://github.com/marketplace/actions/markdownlint-cli2-action - - name: Markdown Lint - uses: DavidAnson/markdownlint-cli2-action@v14 - if: steps.changed-files.outputs.any_changed == 'true' - with: - globs: ${{ steps.changed-files.outputs.all_changed_files }} - separator: "," - config: '.rules/.markdownlint.jsonc' - fix: true + # https://github.com/marketplace/actions/markdownlint-cli2-action + - name: Identify changed files + uses: tj-actions/changed-files@v41 + id: changed-files + with: + files: '**/*.md' + separator: "," + # https://github.com/marketplace/actions/markdownlint-cli2-action + - name: Markdown Lint + uses: DavidAnson/markdownlint-cli2-action@v14 + if: steps.changed-files.outputs.any_changed == 'true' + with: + globs: ${{ steps.changed-files.outputs.all_changed_files }} + separator: "," + config: '.rules/.markdownlint.jsonc' + fix: true markdown-links: name: Check links runs-on: ubuntu-latest steps: - - name: Check out code - uses: actions/checkout@v4.1.0 + - name: Check out code + uses: actions/checkout@v4.1.0 - # https://github.com/gaurav-nelson/github-action-markdown-link-check - - name: Markdown links - uses: gaurav-nelson/github-action-markdown-link-check@v1 - with: - check-modified-files-only: yes - config-file: '.rules/mlc_config.json' - base-branch: 'main' + # https://github.com/gaurav-nelson/github-action-markdown-link-check + - name: Markdown links + uses: gaurav-nelson/github-action-markdown-link-check@v1 + with: + check-modified-files-only: yes + config-file: '.rules/mlc_config.json' + base-branch: 'main' +...