1
0
mirror of https://github.com/j178/prek.git synced 2026-04-25 02:11:36 +02:00
Commit Graph

1204 Commits

Author SHA1 Message Date
Jo 164ede8870 Fix check-added-large-files for traced files (#1260) 2025-12-22 20:31:30 +08:00
Branch Vincent d1e05b6742 Support git urls for rust dependencies (#1256) 2025-12-22 12:05:13 +08:00
Jo 9e7b674c7f Fix docker tags (#1257) 2025-12-22 11:30:13 +08:00
Jo 02414edb56 Render changelog in document site (#1248)
# Conflicts:
#	.github/workflows/release.yml
2025-12-22 00:49:01 +08:00
Jo 885812e7ca Fix build-docker job permission (#1255) 2025-12-22 00:41:06 +08:00
Jo c8b46885be Add docker integration docs (#1254) 2025-12-22 00:34:51 +08:00
Jo 997c89c268 Build and publish docker image to ghcr.io/j178/prek (#1253) 2025-12-22 00:26:49 +08:00
Jo ae056aff2d Clarify priority scope across repos (#1251) 2025-12-21 14:17:14 +08:00
Jo 6a5531835e Use repo: builtin hooks (#1250) 2025-12-20 23:38:11 +08:00
Jo 17a2f64eba Improve documentation for configurations (#1247) 2025-12-20 14:10:44 +08:00
Jo 5e489814e1 Bump version to 0.2.23 (#1246) v0.2.23 2025-12-20 13:21:53 +08:00
Jo c7545d8edb Improve documentation for priority (#1245) 2025-12-20 12:46:10 +08:00
Jo 1c9d1f5618 Implement priority based parallel execution (#1232)
* Support priority-based parallel hook execution

* .

* .

* .

* .

* .

* Implement `priority` based parallel exeuction

* Reduce repeated code

* Add progress for processing files

* Improve sytling

* Tweak UI

* Fix UI

* Update snaps

* Update docs

* Add a test

* Update proposal

* Update crates/prek/src/config.rs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Apply review feedbacks

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-20 12:09:42 +08:00
Jo 917aafd11e Update README.md 2025-12-20 11:13:24 +08:00
Jo 6a5acb556f Upgrade Rust toolchain to 1.92 (#1244) 2025-12-19 23:25:30 +08:00
Jo b13cdddcc2 Add FastAPI to the list of projects using prek (#1241) 2025-12-19 21:06:11 +08:00
Jo ecf7c5ba2d Fix check-executable-have-shebangs "command line too long" error on Windows (#1236) 2025-12-18 15:05:05 +08:00
Louis Maddox 5785a1aa42 Implement check-case-conflict as builtin hook (#888)
* feat(check-case-conflict): implement builtin hook

# Conflicts:
#	crates/prek/src/hooks/pre_commit_hooks/check_case_conflict.rs
#	crates/prek/tests/builtin_hooks.rs
#	src/builtin/pre_commit_hooks/mod.rs

* fix: exit test gracefully on case insensitive file system

* Add docs

* Fix tests

* Add to builtin hooks

* Reduce allocs

* Further reduce

---------

Co-authored-by: Jo <10510431+j178@users.noreply.github.com>
2025-12-18 13:42:10 +08:00
Jo 70ebd87ed8 Mention prek can be installed viataiki-e/install-action@prek (#1234) 2025-12-17 21:57:16 +08:00
Jo d4adf8bf68 Update project development status (#1231) 2025-12-17 17:15:20 +08:00
Jo 9dd875d8c2 Bump taiki-e/install-action to v2.63.3 (#1230) 2025-12-15 22:40:05 +08:00
renovate[bot] 93926c9ce6 Update Rust crate fancy-regex to 0.17.0 (#1218)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-15 12:07:54 +08:00
Jo 4393ca68a8 Allow uv reading user-level or system-level configuration files (#1227)
* Allow uv reading user-level or system-level configuration files

* Improve function naming
2025-12-15 12:06:27 +08:00
Jo 0e0c591405 Add a test to make sure prek auto-update freeze uses the commit hash when it’s pointed to by an annotated tag (#1226) 2025-12-14 19:45:34 +08:00
Copilot a46ae58c29 Document hook_types flag and default_install_hook_types behavior (#1225) 2025-12-14 17:35:17 +08:00
Jo 6d14524326 Bump version to 0.2.22 (#1223) v0.2.22 2025-12-13 20:49:03 +08:00
Jo cc9517b990 Cleanup some code for auto-update (#1222) 2025-12-13 20:13:00 +08:00
renovate[bot] eebe0b5fab Update GitHub Actions (#1219) 2025-12-13 20:10:57 +08:00
Jo 72f4c5a59a Prefer tag creation timestamp in --cooldown-days (#1221)
Use `git for-each-ref --sort=-creatordate --format='%(refname:lstrip=2) %(creatordate:unix)' refs/tags` to get a list of tags along with their timestamps.
`creatordate` uses the tag’s creation time if it’s an annotated tag, and if it’s a lightweight tag, it falls back to the commit’s timestamp.
2025-12-13 19:19:55 +08:00
Jo b0a25bf90d Fix maturin manifest path (#1220) 2025-12-13 18:10:44 +08:00
Jo 34d42a7a15 Compile insta in opt mode (#1215) 2025-12-12 16:05:33 +08:00
Jo c0ef82c8cc Remove CI badge from README.md (#1214) 2025-12-12 13:52:33 +08:00
Louis Maddox 2ad3a70f07 Support--cooldown-days in prek auto-update (#1172)
* feat: implement cooldown (default: 1 day)

* refactor: make update_repo a coordinator function

* fix: fallback to search all tags when candidate fails

* perf: batch the tag commit date iteration into one call

* Simplify logic

* Add tests

* Change `--cooldown-days` default to 0, keep backward compability

* Remove `cooldown_days` from config

---------

Co-authored-by: Jo <10510431+j178@users.noreply.github.com>
2025-12-12 13:30:30 +08:00
Jo 42ab6a3d1c Migrate to virtual workspace layout (#1210) 2025-12-09 17:54:57 +08:00
Jo 03f13b925c Set CARGO_HOME for cargo metadata (#1209) 2025-12-09 15:45:32 +08:00
Jo b84c30cdb7 Cleanup code for rust language (#1208) 2025-12-09 14:54:38 +08:00
Jo 0fcc678d45 Use cargo install for packages in workspace (#1207) 2025-12-09 14:49:20 +08:00
Jo 6dcab879a8 Bump version to 0.2.21 (#1206) v0.2.21 2025-12-09 13:11:46 +08:00
Jo 56b671f922 Simplify find_package_dir (#1205) 2025-12-09 12:17:15 +08:00
Jo 1b1eca0562 Prepend toolchain bin directory to PATH when calling cargo (#1204) 2025-12-09 11:19:44 +08:00
Jo 53ae118348 Fallback to use remote repo package root instead of erroring (#1203) 2025-12-09 00:46:15 +08:00
Jo 554fb51250 Use cargo from installed toolchain (#1202) 2025-12-08 23:56:31 +08:00
Jo adbb89f6a2 Bump version to 0.2.20 (#1199) v0.2.20 2025-12-08 17:14:28 +08:00
Jo 292063956f Refactor Rust toolchain management (#1198)
* Refactor Rust toolchain management

- Reuse system installed rustup
- Reuse installed rustup across hooks
- Reuse installed Rust toolchains across hooks

* Fix tests

* Avoid using bare cargo

* Update crates/prek-consts/src/env_vars.rs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-08 16:41:06 +08:00
Jo db20094e28 Improve error message for invalid number of arguments to hook-impl (#1196) 2025-12-06 15:41:15 +08:00
Jo 6a2f212fea Upgrade dependencies for docs (#1195) 2025-12-06 14:24:08 +08:00
drainpixie adf78165d8 Fallback to manual stage for hooks specified directly in command line (#1185)
* feat(run): assume stage based on selected hooks

* fix(run): don't clone eagerly

* Remove fallback to `--all-files`, add tests

* Generate cli docs

* Improve wording

---------

Co-authored-by: Jo <10510431+j178@users.noreply.github.com>
2025-12-05 14:58:24 +08:00
Jamison Lahman 20dbb99b3c Prevent post-checkout deadlock when cloning repos (#1192)
* fix: deadlock on hook-install w/ post-checkout hook

* Set `PREK_INTERNAL__SKIP_POST_CHECKOUT` env var instead

---------

Co-authored-by: Jo <10510431+j178@users.noreply.github.com>
2025-12-05 14:39:02 +08:00
Jo 2497649b05 Disable git terminal prompts (#1193) 2025-12-05 11:29:16 +08:00
Matthew Mckee b5be7c6c92 Provide more information when validating configs and manifests (#1182)
* Provide more information when validating configs and manifests

* Fix tests

* Fix other snapshot

* Write to printer to allow hide output with `-q`

---------

Co-authored-by: Jo <10510431+j178@users.noreply.github.com>
2025-12-04 17:40:39 +08:00