Run repository checks
Before opening a pull request, run the configured file checks from your repository root.
prek run --all-files
Prek selects hooks based on the files they apply to. Some hooks fix formatting or lint issues in place. Review any changes with git diff and rerun the check. To check only the files you're working on, name them explicitly. This also works for files you have yet to add to Git.
prek run --files README.md zensical.toml
If a hook fails, start with the hook name and file paths in its output. For example, after fixing a Markdown problem, rerun only the rumdl hook on that file.
prek run rumdl --files README.md
See Format and lint files for direct commands and CI workflow for when checks run on GitHub. To set up a Python test suite, see Add tests.
Enable commit hooks
From the repository root, install the configured Git hooks with Prek.
prek install
The repository configures both pre-commit and commit-msg. See Git hooks for when each runs and how to handle files rewritten during a commit.