You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add check and fix commands for read_only hook filtering
#3015
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Summary
Add two hook selection modes to
prek run, with corresponding top-level commands as shortcuts, based on theread_onlyproperty introduced in #3014.Proposed behavior
Check: Run only hooks with
read_only: true.prek run --checkprek checkFix: Run only hooks with
read_only: false.prek run --fixprek fixBoth modes should:
read_onlyvalue, including defaults and configuration overrides.prek runoptions and hook selection filters.prek run.Unlike #2491,
--checkwould only filter hooks by their declaredread_onlyproperty, without sandboxing or rolling back changes.Usage
Run only read-only hooks:
Run only potentially modifying hooks:
This provides a clear separation between validation and fixing while retaining the existing hook execution behavior.
References
All reactions