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

127 Commits

Author SHA1 Message Date
Shaan Majid f5262b6b2c docs: fix HTML anchors, grammar, capitalization, and add missing tracking issues (#1448) 2026-01-22 02:06:13 +08:00
jmm 5400299a4d Add pronounciation entry to FAQ. (#1442) 2026-01-22 00:00:44 +08:00
Jo 23b4456a80 Expand ~ tilde in PREK_HOME (#1431) 2026-01-21 11:35:52 +08:00
Jo ccc8f92ca7 Remove mkdocs hooks (#1424) 2026-01-20 19:50:07 +08:00
Kevin Gimbel 88c3c87954 Move docs to zensical (#1421)
* chore: slight formatting adjustments

* feat: use zensical

* chore: add uv to mise.toml

* docs: update snippets and snippet markers for includes

* chore: add prek to mise.toml; run prek

* fix: use snippet for changelog instead of symlink

Seems Zensical doesn't like symlinks, a snippet gets the same result

* chore: remove commented-out code

* chore: remove commented-out code; run prek
2026-01-20 19:44:15 +08:00
Matthias Schoettle 0784ddfaea Add mdformat pre-commit hook (#1416) 2026-01-20 11:26:37 +08:00
Matthias Schoettle a01951d129 Fix nested list indent rendering issue (#1414) 2026-01-20 05:09:57 +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 ac1b1d4202 Add --stage as an alias for --hook-stage (#1398) 2026-01-18 22:37:42 +08:00
Jo de647489ea Bump version to 0.2.30 (#1392) 2026-01-18 20:49:58 +08:00
Jo b7b453d500 Document that check-json5 now rejects duplicate keys (#1391) 2026-01-18 17:01:09 +08:00
Jo 52c20ab065 Document language support details (#1380) 2026-01-17 17:48:11 +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) 2026-01-16 19:28:25 +08:00
Jo f6731ad435 Explain project configuration scope (#1373) 2026-01-16 19:09:44 +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 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 4b7521bc96 Bump version to 0.2.28 (#1349) 2026-01-13 22:57:14 +08:00
Copilot c48699a526 Document UV environment variable inheritance in prek (#1339)
* Initial plan

* Document UV environment variable impact in diff.md

Co-authored-by: j178 <10510431+j178@users.noreply.github.com>

* Use mkdocs-material warning callout for UV environment variables

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>
2026-01-12 20:47:58 +08:00
Jo b99d05c440 Complete configuration document (#1338) 2026-01-12 20:34:11 +08:00
dependabot[bot] 11b9171b83 Bump urllib3 from 2.6.0 to 2.6.3 in /docs (#1324)
Bumps [urllib3](https://github.com/urllib3/urllib3) from 2.6.0 to 2.6.3.
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/2.6.0...2.6.3)

---
updated-dependencies:
- dependency-name: urllib3
  dependency-version: 2.6.3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-08 15:37:07 +08:00
Jo 549f3ae299 Remove background from logo (#1322) 2026-01-07 22:45:33 +08:00
Jo a72a3cc3df Bump version to 0.2.27 (#1321) 2026-01-07 22:14:04 +08:00
Jo e255e88d37 Bump version to 0.2.26 (#1318) 2026-01-07 20:49:55 +08:00
Branch Vincent d0c33b1833 Support apple's container for docker lang (#1306)
* Support apple's `container` for docker lang

* Tweak

---------

Co-authored-by: Jo <10510431+j178@users.noreply.github.com>
2026-01-07 16:09:05 +08:00
Jo d07b1916ae Skip cookiecutter template directories like {{cookiecutter.project_slug}} during project discovery (#1316)
Fixes #1315
Updates #1044
2026-01-07 15:53:02 +08:00
Daniel Parks 0efd6370d7 Add env to set environment variables for hooks (#1279) (#1285)
* Add `env` to set environment variables for hooks (#1279)

This key is not supported by `pre-commit`.

* DO NOT MERGE: use my fork of prek-test-repos/script-hooks

* Update test

---------

Co-authored-by: Jo <10510431+j178@users.noreply.github.com>
2025-12-30 17:08:44 +08:00
Jo 1856285aba Bump version to 0.2.25 (#1282)
* Bump version to 0.2.25

* Update JSON schema
2025-12-27 00:36:49 +08:00
Jo 28df874c3f Use grouped code blocks in index.md (#1276) 2025-12-24 20:02:00 +08:00
Jo 0278b59b76 Bump version to 0.2.24 (#1265) 2025-12-23 11:01:07 +08:00
Jo 02414edb56 Render changelog in document site (#1248)
# Conflicts:
#	.github/workflows/release.yml
2025-12-22 00:49:01 +08:00
Jo c8b46885be Add docker integration docs (#1254) 2025-12-22 00:34:51 +08:00
Jo ae056aff2d Clarify priority scope across repos (#1251) 2025-12-21 14:17:14 +08:00
Jo 17a2f64eba Improve documentation for configurations (#1247) 2025-12-20 14:10:44 +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
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
Copilot a46ae58c29 Document hook_types flag and default_install_hook_types behavior (#1225) 2025-12-14 17:35:17 +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
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 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 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
Louis Maddox dad650b965 rust: add support for finding packages in virtual workspaces (#1180)
* fix(rust): find packages in virtual workspaces

* chore(deps): add cargo_metadata

* refactor: use cargo_metadata instead of DIY approach

* revert: do not change prek's own typos hook

* Sort deps

* Mention in `diff.md`

* Minor tweaks

---------

Co-authored-by: Jo <10510431+j178@users.noreply.github.com>
2025-12-04 17:18:36 +08:00
Jo 008d3f4d16 Move badge into docs/assets (#1188) 2025-12-04 11:51:30 +08:00
Francesco Zardi 9a720e94d4 Add favicon for docs website (#1187) 2025-12-04 06:31:25 +08:00
Matthew Mckee bd4da34a51 Add cache size command (#1183) 2025-12-03 12:42:45 +08:00
Louis Maddox 3ff564e8bf Add prek: enabled repo badge (#1171)
As requested in https://github.com/j178/prek/issues/1100
2025-12-02 10:57:07 +08:00
Jo 1bb181ffa3 Add a FAQ page explaning prek install --install--hooks (#1162) 2025-11-29 19:52:52 +08:00