1
0
mirror of https://github.com/j178/prek.git synced 2026-04-03 17:34:03 +02:00
Commit Graph

8 Commits

Author SHA1 Message Date
Aditya Yadav
67d956e8a0 Add --fail-fast CLI flag to stop after first hook failure (#908)
* Add --fail-fast CLI flag to stop after first hook failure

- Add fail_fast field to RunArgs struct with CLI flag support
- Fix in hook_impl.rs where fail_fast was hardcoded to false
- Update run() and run_hooks() to accept and propagate fail_fast parameter
- CLI flag overrides config file setting (enables fail-fast mode)
- Ensure try-repo and main entry point pass fail_fast correctly

* Update test snapshots for --fail-fast flag

* Add CLI flag test for --fail-fast

* Fix trailing whitespace in test comment
2025-10-17 11:07:27 +08:00
Luiz Otavio Vilas Boas Oliveira
74cb495dea Implement prek try-repo (#797)
* Add try_repo logic and tests (WIP)

* Remove unnecessary mut

* Fix clippy issues

* Add unit test

* Update snapshots

* Update docs

* Update unit test

* WIP

* Update snapshots

* Lint

* Add extra filters to try_repo tests

* Lint

* Update unit tests

* Apply Josh's suggestions

* Fix arg name

* .

* Fix

* Fix

* Generate

* Fix snapshot

* Improve coverage

---------

Co-authored-by: Jo <10510431+j178@users.noreply.github.com>
2025-10-10 21:11:31 +08:00
Jo
6c0cd3b7c8 Make prek auto-update --jobs default to 0 (which uses max available parallelism) (#833) 2025-10-01 23:03:56 +08:00
Jo
0adb26401d Add a global --log-file flag to specify the log file path (#817) 2025-09-29 16:30:48 +08:00
Jo
d7c39b5733 Show error message in quiet mode (#807)
* Show error message in quiet mode

In quiet mode (`-q`), error messages will still be printed.
In silent mode (`-qq`), nothing gets printed.

* Generate cli doc

* Add test
2025-09-28 13:50:16 +08:00
Jo
d0f7c4d6b0 Add --dry-run to prek auto-update (#806) 2025-09-28 12:06:44 +08:00
Jo
04bb76fcb4 Add prek cache dir, move prek gc and prek clean under prek cache (#795)
`prek gc` and `prek clean` are still available but hidden.
2025-09-25 13:36:41 +08:00
Jo
6f0a7da41b Generate cli reference (#707)
* Generate cli reference

* Fix lint
2025-09-10 22:05:05 +08:00