Skip to content

Commit 2cf690b

Browse files
authored
ci: Replace reviewdog with pre-commit (#854)
* ci: Replace reviewdog with pre-commit * ci: Add --from-ref and --to-ref arguments * ci: Add fetch-depth: 0
1 parent 01e3e98 commit 2cf690b

File tree

3 files changed

+19
-58
lines changed

3 files changed

+19
-58
lines changed

.github/workflows/pr_pre-commit.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
16+
with:
17+
fetch-depth: 0
1618
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
1719
with:
1820
python-version: '3.12'
@@ -21,3 +23,5 @@ jobs:
2123
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
2224
components: rustfmt,clippy
2325
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
26+
with:
27+
extra_args: "--from-ref ${{ github.event.pull_request.base.sha }} --to-ref ${{ github.event.pull_request.head.sha }}"

.github/workflows/reviewdog.yaml

Lines changed: 0 additions & 51 deletions
This file was deleted.

.pre-commit-config.yaml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
---
2-
# See https://pre-commit.com for more information
3-
# See https://pre-commit.com/hooks.html for more hooks
42
repos:
53
- repo: https://github.com/pre-commit/pre-commit-hooks
6-
rev: v4.2.0
4+
rev: 2c9f875913ee60ca25ce70243dc24d5b6415598c # 4.6.0
75
hooks:
86
- id: trailing-whitespace
97
- id: end-of-file-fixer
@@ -12,28 +10,38 @@ repos:
1210
- id: detect-private-key
1311

1412
- repo: https://github.com/doublify/pre-commit-rust
15-
rev: v1.0
13+
rev: eeee35a89e69d5772bdee97db1a6a898467b686e # 1.0
1614
hooks:
1715
- id: fmt
1816
args: ["--all", "--", "--check"]
1917
- id: clippy
2018
args: ["--all-targets", "--", "-D", "warnings"]
2119
- repo: https://github.com/adrienverge/yamllint
22-
rev: v1.26.3
20+
rev: 81e9f98ffd059efe8aa9c1b1a42e5cce61b640c6 # 1.35.1
2321
hooks:
2422
- id: yamllint
2523

2624
- repo: https://github.com/igorshubovych/markdownlint-cli
27-
rev: v0.31.1
25+
rev: f295829140d25717bc79368d3f966fc1f67a824f # 0.41.0
2826
hooks:
2927
- id: markdownlint
3028

3129
- repo: https://github.com/koalaman/shellcheck-precommit
32-
rev: v0.10.0
30+
rev: 2491238703a5d3415bb2b7ff11388bf775372f29 # 0.10.0
3331
hooks:
3432
- id: shellcheck
3533
args: ["--severity=info"]
3634

35+
- repo: https://github.com/rhysd/actionlint
36+
rev: 62dc61a45fc95efe8c800af7a557ab0b9165d63b # 1.7.1
37+
hooks:
38+
- id: actionlint
39+
40+
- repo: https://github.com/hadolint/hadolint
41+
rev: b3555ba9c2bfd9401e79f2f0da68dd1ae38e10c7 # 2.12.0
42+
hooks:
43+
- id: hadolint
44+
3745
- repo: local
3846
hooks:
3947
- id: .scripts/verify-crate-versions

0 commit comments

Comments
 (0)