Skip to content

Commit a9c4960

Browse files
committed
refactor: use prek instead of pre-commit
1 parent a7e34fc commit a9c4960

10 files changed

Lines changed: 24 additions & 24 deletions

File tree

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v5.0.0
3+
rev: v6.0.0
44
hooks:
55
- id: check-added-large-files
66
- id: check-case-conflict
@@ -12,7 +12,7 @@ repos:
1212
args: [ --fix=lf ]
1313
- id: trailing-whitespace
1414
- repo: https://github.com/commitizen-tools/commitizen
15-
rev: v3.30.1
15+
rev: v4.9.1
1616
hooks:
1717
- id: commitizen
1818
- id: commitizen-branch

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
# init
55
init:
6-
@pre-commit install --hook-type commit-msg --hook-type pre-push
6+
@prek install --skip template/ --hook-type commit-msg --hook-type pre-commit --hook-type pre-push
77

88
# Update the changelog
99
cliff:

template/cuda/{{cookiecutter.project_slug}}/.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v5.0.0
3+
rev: v6.0.0
44
hooks:
55
- id: check-merge-conflict
66
- id: check-toml
@@ -10,7 +10,7 @@ repos:
1010
args: [ --fix=lf ]
1111
- id: trailing-whitespace
1212
- repo: https://github.com/commitizen-tools/commitizen
13-
rev: v3.30.1
13+
rev: v4.9.1
1414
hooks:
1515
- id: commitizen
1616
- id: commitizen-branch

template/cuda/{{cookiecutter.project_slug}}/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ APP_NAME := {{cookiecutter.project_slug}}
55

66
# init
77
init:
8-
@pre-commit install --hook-type commit-msg --hook-type pre-push
8+
@prek install --hook-type commit-msg --hook-type pre-commit --hook-type pre-push
99

1010
# compile and build
1111
build:

template/cxx/{{cookiecutter.project_slug}}/.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ fail_fast: true
22

33
repos:
44
- repo: https://github.com/pre-commit/pre-commit-hooks
5-
rev: v5.0.0
5+
rev: v6.0.0
66
hooks:
77
- id: check-merge-conflict
88
- id: check-toml
@@ -12,7 +12,7 @@ repos:
1212
args: [ --fix=lf ]
1313
- id: trailing-whitespace
1414
- repo: https://github.com/commitizen-tools/commitizen
15-
rev: v3.30.1
15+
rev: v4.9.1
1616
hooks:
1717
- id: commitizen
1818
- id: commitizen-branch

template/cxx/{{cookiecutter.project_slug}}/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ APP_NAME := {{cookiecutter.project_slug}}
55

66
# init
77
init:
8-
@pre-commit install --hook-type commit-msg --hook-type pre-push
8+
@prek install --hook-type commit-msg --hook-type pre-commit --hook-type pre-push
99

1010
# compile and build
1111
build:

template/go/{{cookiecutter.project_slug}}/.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ fail_fast: true
22

33
repos:
44
- repo: https://github.com/pre-commit/pre-commit-hooks
5-
rev: v5.0.0
5+
rev: v6.0.0
66
hooks:
77
- id: check-merge-conflict
88
- id: check-toml
@@ -12,12 +12,12 @@ repos:
1212
args: [ --fix=lf ]
1313
- id: trailing-whitespace
1414
- repo: https://github.com/commitizen-tools/commitizen
15-
rev: v3.30.1
15+
rev: v4.9.1
1616
hooks:
1717
- id: commitizen
1818
- id: commitizen-branch
1919
stages: [ pre-push ]
2020
- repo: https://github.com/golangci/golangci-lint
21-
rev: v1.60.3
21+
rev: v2.4.0
2222
hooks:
2323
- id: golangci-lint

template/py/{{cookiecutter.project_slug}}/.pre-commit-config.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ fail_fast: true
22

33
repos:
44
- repo: https://github.com/pre-commit/pre-commit-hooks
5-
rev: v5.0.0
5+
rev: v6.0.0
66
hooks:
77
- id: check-merge-conflict
88
- id: check-toml
@@ -12,18 +12,18 @@ repos:
1212
args: [ --fix=lf ]
1313
- id: trailing-whitespace
1414
- repo: https://github.com/commitizen-tools/commitizen
15-
rev: v3.30.1
15+
rev: v4.9.1
1616
hooks:
1717
- id: commitizen
1818
- id: commitizen-branch
1919
stages: [ pre-push ]
2020
- repo: https://github.com/astral-sh/ruff-pre-commit
21-
rev: v0.8.0
21+
rev: v0.13.0
2222
hooks:
2323
- id: ruff-format
24-
- id: ruff
24+
- id: ruff-check
2525
args: [--fix, --exit-non-zero-on-fix]
2626
- repo: https://github.com/astral-sh/uv-pre-commit
27-
rev: 0.5.1
27+
rev: 0.8.17
2828
hooks:
2929
- id: uv-lock

template/py/{{cookiecutter.project_slug}}/Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ APP_NAME := {{cookiecutter.project_slug}}
55

66
# Init the venv
77
init: sync
8-
@uv run pre-commit install --hook-type commit-msg --hook-type pre-push
8+
@uvx prek install --hook-type commit-msg --hook-type pre-commit --hook-type pre-push
99

1010
# Sync the project with the venv
1111
sync:
@@ -17,20 +17,20 @@ build:
1717

1818
# Test
1919
test:
20-
@uv run pytest
20+
@uvx pytest
2121

2222
# Allure report
2323
allure:
2424
@allure serve allure-results
2525

2626
# Ruff
2727
ruff:
28-
@uv run ruff format .
29-
@uv run ruff check . --fix
28+
@uvx ruff format .
29+
@uvx ruff check . --fix
3030

3131
# Type check
3232
type:
33-
@uv run mypy .
33+
@uvx mypy .
3434

3535
# Build image
3636
image:

template/rs/{{cookiecutter.project_slug}}/.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ fail_fast: true
22

33
repos:
44
- repo: https://github.com/pre-commit/pre-commit-hooks
5-
rev: v5.0.0
5+
rev: v6.0.0
66
hooks:
77
- id: check-merge-conflict
88
- id: check-toml
@@ -12,7 +12,7 @@ repos:
1212
args: [ --fix=lf ]
1313
- id: trailing-whitespace
1414
- repo: https://github.com/commitizen-tools/commitizen
15-
rev: v3.30.1
15+
rev: v4.9.1
1616
hooks:
1717
- id: commitizen
1818
- id: commitizen-branch

0 commit comments

Comments
 (0)