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
This commit is contained in:
John Bampton
2021-05-04 10:55:43 +10:00
parent 50b6fafddf
commit dab5502e8a
15 changed files with 83 additions and 40 deletions
+23 -2
View File
@@ -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