Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,24 @@ name: pre-commit
on:
pull_request:

env:
CARGO_TERM_COLOR: always
RUST_TOOLCHAIN_VERSION: "1.80.1"

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
python-version: '3.12'
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
components: rustfmt,clippy
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
with:
extra_args: "" # Disable --all-files until we have time to fix druid/stackable/bin/run-druid
extra_args: "--from-ref ${{ github.event.pull_request.base.sha }} --to-ref ${{ github.event.pull_request.head.sha }}"
83 changes: 0 additions & 83 deletions .github/workflows/pr_reviewdog.yaml

This file was deleted.

32 changes: 17 additions & 15 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,40 +1,32 @@
---
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
fail_fast: false

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: 2c9f875913ee60ca25ce70243dc24d5b6415598c # 4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: detect-aws-credentials
args: ["--allow-missing-credentials"]
- id: detect-private-key

- repo: https://github.com/doublify/pre-commit-rust
rev: v1.0
hooks:
- id: fmt
args: ["--all", "--", "--check"]
- id: clippy
args: ["--all-targets", "--", "-D", "warnings"]

- repo: https://github.com/adrienverge/yamllint
rev: v1.35.1
rev: 81e9f98ffd059efe8aa9c1b1a42e5cce61b640c6 # 1.35.1
hooks:
- id: yamllint
types: [text]
files: \.(yml|yaml)(\.j2)*$

- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.40.0
rev: f295829140d25717bc79368d3f966fc1f67a824f # 0.41.0
hooks:
- id: markdownlint
types: [text]
files: \.md(\.j2)*$

- repo: https://github.com/koalaman/shellcheck-precommit
rev: v0.10.0
rev: 2491238703a5d3415bb2b7ff11388bf775372f29 # 0.10.0
hooks:
- id: shellcheck
args: ["--severity=info"]
Expand All @@ -43,9 +35,19 @@ repos:
# If you do not, you will need to delete the cached ruff binary shown in the
# error message
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.1
rev: f1ebc5730d98440041cc43e4d69829ad598ae1e7 # 0.6.3
hooks:
# Run the linter.
- id: ruff
# Run the formatter.
- id: ruff-format

- repo: https://github.com/rhysd/actionlint
rev: 62dc61a45fc95efe8c800af7a557ab0b9165d63b # 1.7.1
hooks:
- id: actionlint

- repo: https://github.com/hadolint/hadolint
rev: b3555ba9c2bfd9401e79f2f0da68dd1ae38e10c7 # 2.12.0
hooks:
- id: hadolint
27 changes: 27 additions & 0 deletions template/.github/workflows/pr_pre-commit.yaml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: pre-commit

on:
pull_request:

env:
CARGO_TERM_COLOR: always
RUST_TOOLCHAIN_VERSION: "{[ rust_version }]"

jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
with:
python-version: '3.12'
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
components: rustfmt,clippy
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
with:
extra_args: "--from-ref ${{ github.event.pull_request.base.sha }} --to-ref ${{ github.event.pull_request.head.sha }}"
79 changes: 0 additions & 79 deletions template/.github/workflows/pr_reviewdog.yaml

This file was deleted.

24 changes: 16 additions & 8 deletions template/.pre-commit-config.yaml.j2
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
---
exclude: ^(Cargo\.nix|crate-hashes\.json|nix/.*)$

# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: 2c9f875913ee60ca25ce70243dc24d5b6415598c # 4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
Expand All @@ -14,27 +12,27 @@ repos:
- id: detect-private-key

- repo: https://github.com/doublify/pre-commit-rust
rev: v1.0
rev: eeee35a89e69d5772bdee97db1a6a898467b686e # 1.0
hooks:
- id: fmt
args: ["--all", "--", "--check"]
- id: clippy
args: ["--all-targets", "--", "-D", "warnings"]

- repo: https://github.com/adrienverge/yamllint
rev: v1.35.1
rev: 81e9f98ffd059efe8aa9c1b1a42e5cce61b640c6 # 1.35.1
hooks:
- id: yamllint

- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.40.0
rev: f295829140d25717bc79368d3f966fc1f67a824f # 0.41.0
hooks:
- id: markdownlint
types: [text]
files: \.md(\.j2)*$

- repo: https://github.com/koalaman/shellcheck-precommit
rev: v0.10.0
rev: 2491238703a5d3415bb2b7ff11388bf775372f29 # 0.10.0
hooks:
- id: shellcheck
args: ["--severity=info"]
Expand All @@ -43,13 +41,23 @@ repos:
# If you do not, you will need to delete the cached ruff binary shown in the
# error message
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.1
rev: f1ebc5730d98440041cc43e4d69829ad598ae1e7 # 0.6.3
hooks:
# Run the linter.
- id: ruff
# Run the formatter.
- id: ruff-format

- repo: https://github.com/rhysd/actionlint
rev: 62dc61a45fc95efe8c800af7a557ab0b9165d63b # 1.7.1
hooks:
- id: actionlint

- repo: https://github.com/hadolint/hadolint
rev: b3555ba9c2bfd9401e79f2f0da68dd1ae38e10c7 # 2.12.0
hooks:
- id: hadolint

- repo: local
hooks:
- id: regenerate-charts
Expand Down