Skip to content

Commit 73d7e06

Browse files
committed
ci: Replace reviewdog with pre-commit
1 parent 96bde7f commit 73d7e06

File tree

3 files changed

+44
-98
lines changed

3 files changed

+44
-98
lines changed

.github/workflows/pr_pre-commit.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: pre-commit
3+
4+
on:
5+
pull_request:
6+
7+
env:
8+
CARGO_TERM_COLOR: always
9+
RUST_TOOLCHAIN_VERSION: "1.80.1"
10+
11+
jobs:
12+
pre-commit:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
16+
with:
17+
fetch-depth: 0
18+
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
19+
with:
20+
python-version: '3.12'
21+
- uses: dtolnay/rust-toolchain@master
22+
with:
23+
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
24+
components: rustfmt,clippy
25+
- 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/pr_reviewdog.yaml

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

.pre-commit-config.yaml

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,32 @@
11
---
2-
# See https://pre-commit.com for more information
3-
# See https://pre-commit.com/hooks.html for more hooks
2+
fail_fast: false
3+
44
repos:
55
- repo: https://github.com/pre-commit/pre-commit-hooks
6-
rev: v4.6.0
6+
rev: 2c9f875913ee60ca25ce70243dc24d5b6415598c # 4.6.0
77
hooks:
88
- id: trailing-whitespace
99
- id: end-of-file-fixer
1010
- id: detect-aws-credentials
1111
args: ["--allow-missing-credentials"]
1212
- id: detect-private-key
1313

14-
- repo: https://github.com/doublify/pre-commit-rust
15-
rev: v1.0
16-
hooks:
17-
- id: fmt
18-
args: ["--all", "--", "--check"]
19-
- id: clippy
20-
args: ["--all-targets", "--", "-D", "warnings"]
21-
2214
- repo: https://github.com/adrienverge/yamllint
23-
rev: v1.35.1
15+
rev: 81e9f98ffd059efe8aa9c1b1a42e5cce61b640c6 # 1.35.1
2416
hooks:
2517
- id: yamllint
2618
types: [text]
2719
files: \.(yml|yaml)(\.j2)*$
2820

2921
- repo: https://github.com/igorshubovych/markdownlint-cli
30-
rev: v0.40.0
22+
rev: f295829140d25717bc79368d3f966fc1f67a824f # 0.41.0
3123
hooks:
3224
- id: markdownlint
3325
types: [text]
3426
files: \.md(\.j2)*$
3527

3628
- repo: https://github.com/koalaman/shellcheck-precommit
37-
rev: v0.10.0
29+
rev: 2491238703a5d3415bb2b7ff11388bf775372f29 # 0.10.0
3830
hooks:
3931
- id: shellcheck
4032
args: ["--severity=info"]
@@ -43,9 +35,19 @@ repos:
4335
# If you do not, you will need to delete the cached ruff binary shown in the
4436
# error message
4537
- repo: https://github.com/astral-sh/ruff-pre-commit
46-
rev: v0.5.1
38+
rev: f1ebc5730d98440041cc43e4d69829ad598ae1e7 # 0.6.3
4739
hooks:
4840
# Run the linter.
4941
- id: ruff
5042
# Run the formatter.
5143
- id: ruff-format
44+
45+
- repo: https://github.com/rhysd/actionlint
46+
rev: 62dc61a45fc95efe8c800af7a557ab0b9165d63b # 1.7.1
47+
hooks:
48+
- id: actionlint
49+
50+
- repo: https://github.com/hadolint/hadolint
51+
rev: b3555ba9c2bfd9401e79f2f0da68dd1ae38e10c7 # 2.12.0
52+
hooks:
53+
- id: hadolint

0 commit comments

Comments
 (0)