Skip to content

Commit

Permalink
update pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
blink1073 committed May 30, 2024
1 parent d4f5509 commit c4ffee9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 26 deletions.
17 changes: 4 additions & 13 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4

# ref: https://github.com/pre-commit/action
- uses: pre-commit/action@v3.0.1
- name: Help message if pre-commit fail
if: ${{ failure() }}
run: |
echo "You can install pre-commit hooks to automatically run formatting"
echo "on each commit with:"
echo " pre-commit install"
echo "or you can run by hand on staged files with"
echo " pre-commit run"
echo "or after-the-fact on already committed files with"
echo " pre-commit run --all-files --hook-stage manual"
- name: "Run pre-commit"
run:
pip install -U pre-commit
pre-commit run --all-files --hook-stage manual
26 changes: 13 additions & 13 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: check-case-conflict
- id: check-executables-have-shebangs
Expand All @@ -12,18 +12,10 @@ repos:
#- id: trailing-whitespace
#- id: check-json

- repo: https://github.com/executablebooks/mdformat
rev: 0.7.17
hooks:
- id: mdformat
args: ["--wrap=120", "--number"]
additional_dependencies:
[mdformat-gfm, mdformat-frontmatter, mdformat-footnote, mdformat-gfm-alerts]

# We use the Python version instead of the original version which seems to require Docker
# https://github.com/koalaman/shellcheck-precommit
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.9.0.6
rev: v0.10.0.1
hooks:
- id: shellcheck
name: shellcheck
Expand All @@ -41,9 +33,17 @@ repos:
types: [markdown]
entry: bash scripts/check_anchors/check-anchors.sh
language: node

- repo: https://github.com/executablebooks/mdformat
rev: 0.7.17
hooks:
- id: mdformat
args: ["--wrap=120", "--number"]
additional_dependencies:
[mdformat-gfm, mdformat-frontmatter, mdformat-footnote, mdformat-gfm-alerts]

- repo: https://github.com/tcort/markdown-link-check
rev: v3.11.2
rev: v3.12.2
hooks:
- id: markdown-link-check
args: ["-c", "markdown_link_config.json"]
Expand All @@ -57,7 +57,7 @@ repos:
stages: [manual]

- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.27.3
rev: 0.28.4
hooks:
- id: check-github-workflows

Expand All @@ -69,7 +69,7 @@ repos:
- id: rst-inline-touching-normal

- repo: https://github.com/codespell-project/codespell
rev: "v2.2.6"
rev: "v2.3.0"
hooks:
- id: codespell
args: ["-L", "fle,re-use,merchantibility,synching,crate,nin,infinit,te"]
Expand Down

0 comments on commit c4ffee9

Please sign in to comment.