From dab5502e8a16d34d29adee6f7f9cb4f4ae0dfd68 Mon Sep 17 00:00:00 2001 From: John Bampton Date: Tue, 4 May 2021 10:55:43 +1000 Subject: Run pre-commit with GitHub Actions Running pre-commit with GitHub Actions now gives us more tests and coverage Remove duplicate GitHub Actions for merge conflicts and trailing whitespace Remove duplicate checks for markdownlint and yamllint from the GitHub Super-Linter Add new custom pre-commit hook running with a shell script to sort alphabetically and uniquify codespell.txt Add new pre-commit hook to check spelling with codespell https://github.com/codespell-project/codespell Fix spelling --- .pre-commit-config.yaml | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) (limited to '.pre-commit-config.yaml') diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 46abd0675..a274930e7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -27,16 +27,37 @@ repos: # hooks: # - id: forbid-tabs # - id: remove-tabs + - repo: https://github.com/codespell-project/codespell + rev: v2.0.0 + hooks: + - id: codespell + name: Run codespell + description: Check spelling with codespell + entry: codespell --ignore-words=codespell.txt - repo: https://github.com/igorshubovych/markdownlint-cli rev: v0.27.1 hooks: - id: markdownlint name: Run markdownlint + description: Checks the style of Markdown files entry: markdownlint -c .github/linters/.markdown-lint.yml . + types: [markdown] + files: \.(md|mdown|markdown)$ - repo: https://github.com/adrienverge/yamllint rev: v1.26.1 hooks: - id: yamllint - name: Check YAML files with yamllint - entry: yamllint --strict -c .github/linters/.yaml-lint.yml . + name: Run yamllint + description: Check YAML files with yamllint + entry: yamllint --strict -c .github/linters/.yaml-lint.yml types: [yaml] + files: \.(yaml|yml)$ + - repo: local + hooks: + - id: sort-codespell-wordlist + name: Sort codespell.txt + description: Sort alphabetically and uniquify codespell.txt + entry: ./scripts/ci/pre-commit/sort-codespell-wordlist.sh + language: system + files: ^\.pre-commit-config\.yaml$|^codespell\.txt$ + require_serial: true -- cgit v1.2.3