Skip to content

Commit ba8e375

Browse files
committed
chore: Update templated pre-commit config
1 parent 73d7e06 commit ba8e375

File tree

3 files changed

+27
-88
lines changed

3 files changed

+27
-88
lines changed

template/.github/workflows/pr_pre-commit.yaml renamed to template/.github/workflows/pr_pre-commit.yaml.j2

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,24 @@ name: pre-commit
44
on:
55
pull_request:
66

7+
env:
8+
CARGO_TERM_COLOR: always
9+
RUST_TOOLCHAIN_VERSION: "{[ rust_version }]"
10+
711
jobs:
812
pre-commit:
913
runs-on: ubuntu-latest
1014
steps:
1115
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
16+
with:
17+
fetch-depth: 0
1218
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
1319
with:
1420
python-version: '3.12'
21+
- uses: dtolnay/rust-toolchain@master
22+
with:
23+
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
24+
components: rustfmt,clippy
1525
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
1626
with:
17-
extra_args: "" # Disable --all-files until we have time to fix druid/stackable/bin/run-druid
27+
extra_args: "--from-ref ${{ github.event.pull_request.base.sha }} --to-ref ${{ github.event.pull_request.head.sha }}"

template/.github/workflows/pr_reviewdog.yaml

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

template/.pre-commit-config.yaml.j2

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
---
22
exclude: ^(Cargo\.nix|crate-hashes\.json|nix/.*)$
33

4-
# See https://pre-commit.com for more information
5-
# See https://pre-commit.com/hooks.html for more hooks
64
repos:
75
- repo: https://github.com/pre-commit/pre-commit-hooks
8-
rev: v4.6.0
6+
rev: 2c9f875913ee60ca25ce70243dc24d5b6415598c # 4.6.0
97
hooks:
108
- id: trailing-whitespace
119
- id: end-of-file-fixer
@@ -14,27 +12,27 @@ repos:
1412
- id: detect-private-key
1513

1614
- repo: https://github.com/doublify/pre-commit-rust
17-
rev: v1.0
15+
rev: eeee35a89e69d5772bdee97db1a6a898467b686e # 1.0
1816
hooks:
1917
- id: fmt
2018
args: ["--all", "--", "--check"]
2119
- id: clippy
2220
args: ["--all-targets", "--", "-D", "warnings"]
2321

2422
- repo: https://github.com/adrienverge/yamllint
25-
rev: v1.35.1
23+
rev: 81e9f98ffd059efe8aa9c1b1a42e5cce61b640c6 # 1.35.1
2624
hooks:
2725
- id: yamllint
2826

2927
- repo: https://github.com/igorshubovych/markdownlint-cli
30-
rev: v0.40.0
28+
rev: f295829140d25717bc79368d3f966fc1f67a824f # 0.41.0
3129
hooks:
3230
- id: markdownlint
3331
types: [text]
3432
files: \.md(\.j2)*$
3533

3634
- repo: https://github.com/koalaman/shellcheck-precommit
37-
rev: v0.10.0
35+
rev: 2491238703a5d3415bb2b7ff11388bf775372f29 # 0.10.0
3836
hooks:
3937
- id: shellcheck
4038
args: ["--severity=info"]
@@ -43,13 +41,23 @@ repos:
4341
# If you do not, you will need to delete the cached ruff binary shown in the
4442
# error message
4543
- repo: https://github.com/astral-sh/ruff-pre-commit
46-
rev: v0.5.1
44+
rev: f1ebc5730d98440041cc43e4d69829ad598ae1e7 # 0.6.3
4745
hooks:
4846
# Run the linter.
4947
- id: ruff
5048
# Run the formatter.
5149
- id: ruff-format
5250

51+
- repo: https://github.com/rhysd/actionlint
52+
rev: 62dc61a45fc95efe8c800af7a557ab0b9165d63b # 1.7.1
53+
hooks:
54+
- id: actionlint
55+
56+
- repo: https://github.com/hadolint/hadolint
57+
rev: b3555ba9c2bfd9401e79f2f0da68dd1ae38e10c7 # 2.12.0
58+
hooks:
59+
- id: hadolint
60+
5361
- repo: local
5462
hooks:
5563
- id: regenerate-charts

0 commit comments

Comments
 (0)