From 0aac7674501f760a413d656f26516b41bf5b62e5 Mon Sep 17 00:00:00 2001 From: Bugale Bugalit Date: Sat, 9 Sep 2023 22:34:51 +0300 Subject: [PATCH] ci: fix outstanding yamlling warnings --- .eslintrc.yml | 3 ++- .github/dependabot.yml | 1 + .github/workflows/check-code.yml | 30 ++++++++++++++--------------- .github/workflows/check-docs.yml | 1 + .github/workflows/check-general.yml | 2 ++ .github/workflows/dependabot.yml | 1 + .github/workflows/release.yml | 1 + .mdl.yml | 1 + .prettierrc.json | 10 +++++++++- action.yml | 1 + 10 files changed, 33 insertions(+), 18 deletions(-) diff --git a/.eslintrc.yml b/.eslintrc.yml index b23d430..91c62fd 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -1,3 +1,4 @@ +--- env: node: true es6: true @@ -23,4 +24,4 @@ rules: 'i18n-text/no-en': 'off' '@typescript-eslint/space-before-function-paren': 'off' 'generator-star-spacing': 'off' - 'prettier/prettier': ['error', { 'endOfLine': 'auto' }] + 'prettier/prettier': ['error', {'endOfLine': 'auto'}] diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 80c65c0..acaebd4 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,3 +1,4 @@ +--- version: 2 updates: - package-ecosystem: github-actions diff --git a/.github/workflows/check-code.yml b/.github/workflows/check-code.yml index 8468001..309a5de 100644 --- a/.github/workflows/check-code.yml +++ b/.github/workflows/check-code.yml @@ -1,3 +1,4 @@ +--- name: Checks on: pull_request: @@ -68,22 +69,19 @@ jobs: fail-fast: false matrix: run: - [ - { linter: 'flake8', format: 'flake8', regex: '', levelMap: '', analysisPath: '.' }, - { linter: 'mypy', format: 'mypy', regex: '', levelMap: '', analysisPath: '.' }, - { linter: 'pylint', format: 'pylint', regex: '', levelMap: '', analysisPath: '.' }, - { linter: 'mdl', format: 'mdl', regex: '', levelMap: '', analysisPath: '.' }, - { linter: 'yamllint', format: 'yamllint', regex: '', levelMap: '', analysisPath: '.' }, - { linter: 'sarif', format: 'sarif', regex: '', levelMap: '', analysisPath: '.' }, - { linter: 'flake8subpath', format: 'flake8', regex: '', levelMap: '', analysisPath: 'A\B' }, - { - linter: 'custom', - format: '', - regex: '^(?[^-\n]+)(?:-(?\d+))?(?:-(?\d+))?(?:-(?\d+))?(?:-(?\d+))? (?[^:\s]+):(?[^:\s]+):(?[^:\s]+) (?.+)$', - levelMap: '{ "err": "error", "warn": "warning", "info": "note" }', - analysisPath: '.' - } - ] + - {linter: 'flake8', format: 'flake8', regex: '', levelMap: '', analysisPath: '.'} + - {linter: 'mypy', format: 'mypy', regex: '', levelMap: '', analysisPath: '.'} + - {linter: 'pylint', format: 'pylint', regex: '', levelMap: '', analysisPath: '.'} + - {linter: 'mdl', format: 'mdl', regex: '', levelMap: '', analysisPath: '.'} + - {linter: 'yamllint', format: 'yamllint', regex: '', levelMap: '', analysisPath: '.'} + - {linter: 'sarif', format: 'sarif', regex: '', levelMap: '', analysisPath: '.'} + - {linter: 'flake8subpath', format: 'flake8', regex: '', levelMap: '', analysisPath: 'A\B'} + - linter: 'custom' + format: '' + # yamllint disable-line rule:line-length + regex: '^(?[^-\n]+)(?:-(?\d+))?(?:-(?\d+))?(?:-(?\d+))?(?:-(?\d+))? (?[^:\s]+):(?[^:\s]+):(?[^:\s]+) (?.+)$' + levelMap: '{ "err": "error", "warn": "warning", "info": "note" }' + analysisPath: '.' name: GitHub Action (${{ matrix.run.linter }}) steps: - name: Checkout diff --git a/.github/workflows/check-docs.yml b/.github/workflows/check-docs.yml index ee85b39..12d4f0c 100644 --- a/.github/workflows/check-docs.yml +++ b/.github/workflows/check-docs.yml @@ -1,3 +1,4 @@ +--- name: Checks on: pull_request: diff --git a/.github/workflows/check-general.yml b/.github/workflows/check-general.yml index 5a54b1d..755d965 100644 --- a/.github/workflows/check-general.yml +++ b/.github/workflows/check-general.yml @@ -1,3 +1,4 @@ +--- name: Checks on: - pull_request @@ -24,6 +25,7 @@ jobs: fetch-depth: ${{ steps.get-base.outputs.required }} ref: ${{ github.event.pull_request.head.sha }} - name: Check Commits + # yamllint disable-line rule:line-length run: commitlint --from ${{ github.event.pull_request.head.sha }}~${{ steps.get-base.outputs.commit-count }} --to ${{ github.event.pull_request.head.sha }} required: runs-on: ubuntu-latest diff --git a/.github/workflows/dependabot.yml b/.github/workflows/dependabot.yml index a4d4135..1855519 100644 --- a/.github/workflows/dependabot.yml +++ b/.github/workflows/dependabot.yml @@ -1,3 +1,4 @@ +--- name: Dependabot on: - pull_request diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c87646a..5d730cf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,3 +1,4 @@ +--- name: Release on: push: diff --git a/.mdl.yml b/.mdl.yml index cb15520..9121d63 100644 --- a/.mdl.yml +++ b/.mdl.yml @@ -1,3 +1,4 @@ +--- # MD013/line-length - Line length MD013: line_length: 160 diff --git a/.prettierrc.json b/.prettierrc.json index 203100f..f6519fb 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -3,5 +3,13 @@ "singleQuote": true, "trailingComma": "none", "endOfLine": "auto", - "semi": false + "semi": false, + "overrides": [ + { + "files": "**.yml", + "options": { + "bracketSpacing": false + } + } + ] } diff --git a/action.yml b/action.yml index 41ab5ca..8287111 100644 --- a/action.yml +++ b/action.yml @@ -1,3 +1,4 @@ +--- name: 'bugalint' description: 'Convert various linter outputs to standard formats' inputs: