Jo
d6088e18e9
Delete SECURITY.md
2026-01-20 06:56:07 +08:00
Shaan Majid
dcf2c5aff1
Use split() instead of resolve(None) for builtin hook argument parsing ( #1415 )
...
* fix: use split() instead of resolve(None) for builtin hook argument parsing
Builtin hooks were calling `hook.entry.resolve(None)` to get arguments
for clap parsing. After commit 85448ac , `resolve(None)` falls back to
system PATH, which can find system-wide binaries (e.g., from
`pip install pre-commit-hooks`), parse their shebangs, and corrupt
argument parsing.
The fix changes these 6 builtin hooks to use `split()` instead, which
just tokenizes the entry string without PATH resolution - exactly what's
needed for argument parsing.
Fixes #1412
* test: add regression test for builtin hooks with system PATH binaries
Adds a test that verifies builtin hooks work correctly even when
system-wide binaries with matching names exist on PATH (e.g., from
`pip install pre-commit-hooks`).
The test creates a fake `trailing-whitespace-fixer` binary with a
shebang in a temp directory, adds it to PATH, and verifies the builtin
trailing-whitespace hook still works correctly.
2026-01-20 05:27:26 +08:00
Yazdan Ranjbar
f32d29236c
Add commitizen to the list of projects using prek ( #1413 )
2026-01-20 05:14:03 +08:00
Matthias Schoettle
a01951d129
Fix nested list indent rendering issue ( #1414 )
2026-01-20 05:09:57 +08:00
Jo
f1b110c0a8
Add tests for yaml::merge_keys ( #1409 )
2026-01-19 18:47:27 +08:00
Jo
1988af24b3
Add two test cases for unknown hook id ( #1408 )
2026-01-19 18:09:41 +08:00
Jo
63a9c5c8f8
Refactor config layout ( #1407 )
...
* Refactor config layout
* Fix
* Add a test
* Tweak
2026-01-19 17:54:01 +08:00
Jo
e9716ae31b
Avoid file lock warning for in-process contention ( #1406 )
...
* .
* Avoid file lock warning for in-process contention
2026-01-19 15:00:51 +08:00
Jo
19b9c866bf
Update project examples in README.md
2026-01-19 14:01:52 +08:00
Jo
ea9a51161c
Set cargo related env vars ( #1405 )
2026-01-19 13:41:43 +08:00
Jo
dfbea266fd
Remove #[cfg(unix)] gate on generating cli reference ( #1402 )
...
* Remove `#[cfg(unix)]` gate on generating cli reference
* Tweak
* Debug
* Debug
* Normalized eol
* Debug
* Add gitattributes
* Final
2026-01-19 13:37:34 +08:00
Jo
97e5b348f1
Add copilot instructions ( #1404 )
2026-01-19 13:17:51 +08:00
Jo
3d562b4f49
Add simple-icons and ast-grep to the users of prek ( #1403 )
2026-01-19 11:30:33 +08:00
Jo
ac1b1d4202
Add --stage as an alias for --hook-stage ( #1398 )
2026-01-18 22:37:42 +08:00
Ülgen Sarıkavak
37d6c10fd1
Update deprecated key ( #1397 )
...
> matchPaths and matchFiles are now combined into matchFileNames, supporting exact match and glob-only. The "any string match" functionality of matchPaths is now removed
https://github.com/renovatebot/renovate/releases/tag/36.0.0
2026-01-18 21:36:01 +08:00
Ülgen Sarıkavak
7c8cdf7e5e
Enable Renovate's ":configMigration" preset ( #1394 )
...
Found that the config needs to be migrated, while testing https://github.com/renovatebot/pre-commit-hooks
2026-01-18 21:11:31 +08:00
Jo
6f53870934
Fix docker build command ( #1395 )
v0.2.30
2026-01-18 21:09:35 +08:00
Jo
300cae9d55
Fix docker build command ( #1393 )
2026-01-18 21:00:16 +08:00
Jo
de647489ea
Bump version to 0.2.30 ( #1392 )
2026-01-18 20:49:58 +08:00
Jo
8faa42c091
Add nextest partitioning for Windows tests ( #1389 )
...
* Add nextest partitioning for Windows tests
* Fix
* Fix
* Fix
* Fix
* Disable optimize for fast-build
* Fix integration bin name
* Fix
* Fix
* Try fix
* Debug
* Fix
* Fix path substitute
* Fix
2026-01-18 20:37:53 +08:00
Jo
b7b453d500
Document that check-json5 now rejects duplicate keys ( #1391 )
2026-01-18 17:01:09 +08:00
Jo
c67ac0ea29
Make CURRENT_REPORTER a Weak<ProgressReporter> ( #1390 )
2026-01-18 16:58:08 +08:00
Jo
4a8b58b7a7
Show warning if file lock acquiring blocks for long time ( #1353 )
...
* Show a lock acquire warning if it blocks
* Improve
* Add test
2026-01-18 16:24:45 +08:00
Jo
845d849719
Speed up reuse_env test case ( #1388 )
...
Replace `flake8` with a local package to reduce install time.
2026-01-18 14:53:39 +08:00
Jo
a58828ca4c
Check for duplicate keys in check-json5 builtin hook ( #1387 )
2026-01-18 14:27:07 +08:00
Jo
0e934c383c
Do not resolve entry for docker_image ( #1386 )
2026-01-18 14:04:39 +08:00
Jo
85448ac471
Fix command lookup on Windows ( #1383 )
...
* Add a failing test
* Fix
* Docker entry should not be resolved
2026-01-17 22:53:13 +08:00
Jo
414d0cc088
Singleflight Python health checks with cached interpreter info ( #1381 )
2026-01-17 19:08:02 +08:00
Jo
52c20ab065
Document language support details ( #1380 )
2026-01-17 17:48:11 +08:00
Jo
340a773f90
Preserve quoting style in auto-update ( #1379 )
2026-01-17 17:28:18 +08:00
Jo
56180f3d29
Build binaries using minimal-size profile ( #1376 )
2026-01-16 21:14:38 +08:00
Jo
8c2580a12b
Fix callout indentation ( #1375 )
2026-01-16 21:07:48 +08:00
Jo
b7a7becead
Bump version to 0.2.29 ( #1374 )
v0.2.29
2026-01-16 19:28:25 +08:00
Jo
f6731ad435
Explain project configuration scope ( #1373 )
2026-01-16 19:09:44 +08:00
Jo
163c910f6f
Use #[serde(try_from)] instead of custom Deserialize ( #1372 )
...
* Use `#[serde(try_from)]` instead of custom Deserialize
* Update schema
2026-01-16 18:37:04 +08:00
Jo
724b2a5719
Use GlobSet instead of Vec<GlobMatcher> ( #1371 )
2026-01-16 17:18:08 +08:00
Na'aman Hirschfeld
392eb2d60c
Add glob list support for file patterns (files and exclude) ( #1197 )
...
* feat: add glob list support for file patterns
# Conflicts:
# docs/configuration.md
* Fix clippy warnings in config tests
* Add tests for glob file patterns
* chore: run cargo fmt
* test: make glob pattern test windows-friendly
* Fix CI: add globset dep and disable GPG signing in tests
* Update json schema
* Tweaks
* Update doc
* Update doc
---------
Co-authored-by: Jo <10510431+j178@users.noreply.github.com >
2026-01-16 16:59:26 +08:00
Jo
be8f49e6f3
Document builtin hooks ( #1370 )
2026-01-16 15:23:39 +08:00
Jo
e317d70939
Tweak CI ( #1369 )
2026-01-16 14:53:38 +08:00
Jo
352685fdbd
Add check-json5 as builtin hooks ( #1367 )
...
* Add `check-json5` as builtin hooks
* Refactor
* Add tests
* Tweak
* Document JSON5 duplicate key behavior in test (#1368 )
* Initial plan
* Add documentation explaining duplicate key behavior in JSON5
Co-authored-by: j178 <10510431+j178@users.noreply.github.com >
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com >
Co-authored-by: j178 <10510431+j178@users.noreply.github.com >
---------
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com >
2026-01-16 14:51:51 +08:00
Jo
29464fb048
Reorder BuiltinHooks members ( #1366 )
2026-01-16 11:43:28 +08:00
Jo
fc54f145d9
Fix some tests isolation when git commit ( #1365 )
...
* Fix some tests isolation when `git commit`
* Fix rust cache save
2026-01-16 11:27:52 +08:00
renovate[bot]
7fd2da8a77
Update taiki-e/install-action action to v2.65.11 ( #1364 )
2026-01-15 22:43:07 +08:00
yihong
639fc48dd2
Set TERM=dumb under PTY to prevent capability-probe hangs ( #1363 )
...
* fix: add env color to fake in child stdin like a real tty to ignore to timeout issue
Signed-off-by: yihong0618 <zouzou0208@gmail.com >
* Set TERM=dumb
* Clippy
---------
Signed-off-by: yihong0618 <zouzou0208@gmail.com >
Co-authored-by: Jo <10510431+j178@users.noreply.github.com >
2026-01-15 22:23:52 +08:00
Jo
34fb8f3ecc
Refactor CI workflow and cargo profile ( #1361 )
2026-01-15 16:54:52 +08:00
Shaan Majid
5f7c764129
Remove git env vars from uv pip install subprocess ( #1355 )
...
* fix: remove GIT env vars from uv pip install subprocess
When prek runs inside a git worktree, git sets GIT_DIR pointing to the
worktree's gitdir. This leaks into `uv pip install`, causing packages
using setuptools_scm for file discovery to have their `git ls-files`
query the wrong repository.
This results in missing package data files (e.g., validate-pyproject's
schema JSON files).
Use the existing `remove_git_envs()` mechanism which removes all GIT_*
vars except those needed for SSH/SSL/auth operations — consistent with
how prek already handles its own git commands.
Fixes #1354
* test: add regression test for GIT_DIR leak into uv pip install
Verifies that GIT environment variables (like GIT_DIR set in worktrees)
do not leak into the uv pip install subprocess, which would break
packages using setuptools_scm for file discovery.
Test fails without the fix, passes with the fix.
2026-01-15 11:54:38 +08:00
Jo
f929d78c6e
Add a renovate rule to update github actions version in README ( #1360 )
2026-01-15 11:43:37 +08:00
renovate[bot]
5f6622ae18
Update dependency uv to v0.9.21 ( #1356 )
2026-01-15 11:18:47 +08:00
renovate[bot]
f1533e1497
Update GitHub Actions ( #1357 )
2026-01-15 11:18:30 +08:00
renovate[bot]
541df23466
Update actions/upload-artifact action to v6 ( #1359 )
2026-01-15 11:18:17 +08:00