prek
Configuration file for prek, a tool for managing git hooks
| Type | object |
|---|---|
| File match |
prek.toml
|
| Schema URL | https://catalog.lintel.tools/schemas/schemastore/prek/latest.json |
| Source | https://www.schemastore.org/prek.json |
Validate with Lintel
npx @lintel/lintel check
The configuration file for prek, a git hook manager written in Rust.
Properties
A list of --hook-types which will be used by default when running prek install.
Default is [pre-commit].
A mapping from language to the default language_version.
22 nested properties
A configuration-wide default for the stages property of hooks. Default to all stages.
A file pattern, either a regex or glob pattern(s).
A file pattern, either a regex or glob pattern(s).
Set to true to have prek stop running hooks after the first failure. Default is false.
The minimum version of prek required to run this configuration.
Set to true to isolate this project from parent configurations in workspace mode. When true, files in this project are "consumed" by this project and will not be processed by parent projects. When false (default), files in subprojects are processed by both the subproject and any parent projects that contain them.
Definitions
A repository of hooks, which can be remote, local, meta, or builtin.
Remote repository location. Must not be local, meta, or builtin.
A remote hook in the configuration file.
All keys in manifest hook dict are valid in a config hook dict, but are optional.
The id of the hook.
Override the name of the hook.
Override the entrypoint. Not documented in the official docs but works.
Priority used by the scheduler to determine ordering and concurrency. Hooks with the same priority can run in parallel.
This is only allowed in project config files (e.g. .pre-commit-config.yaml).
It is not allowed in manifests (e.g. .pre-commit-hooks.yaml).
Not documented in the official docs.
A file pattern, either a regex or glob pattern(s).
A file pattern, either a regex or glob pattern(s).
List of file types to run on (AND).
Default is [file], which matches all files.
List of file types to run on (OR).
Default is [].
List of file types to exclude.
Default is [].
Not documented in the official docs.
Additional arguments to pass to the hook.
Environment variables to set for the hook.
This hook will run even if there are no matching files. Default is false.
If this hook fails, don't run any more hooks. Default is false.
Append filenames that would be checked to the hook entry as arguments. Default is true.
A description of the hook. For metadata only.
Run the hook on a specific version of the language.
Default is default.
See https://pre-commit.com/#overriding-language-version.
Write the output of the hook to a file when the hook fails or verbose is enabled.
This hook will execute using a single process instead of in parallel. Default is false.
Select which git hook(s) to run for. Default all stages are selected. See https://pre-commit.com/#confining-hooks-to-run-at-certain-stages.
Print the output of the hook even if it passes. Default is false.
The minimum version of prek required to run this hook.
A file pattern, either a regex or glob pattern(s).
Must be local.
A local hook in the configuration file.
This is similar to ManifestHook, but includes config-only fields (like priority).
The id of the hook.
The name of the hook.
The command to run. It can contain arguments that will not be overridden.
Priority used by the scheduler to determine ordering and concurrency. Hooks with the same priority can run in parallel.
Not documented in the official docs.
A file pattern, either a regex or glob pattern(s).
A file pattern, either a regex or glob pattern(s).
List of file types to run on (AND).
Default is [file], which matches all files.
List of file types to run on (OR).
Default is [].
List of file types to exclude.
Default is [].
Not documented in the official docs.
Additional arguments to pass to the hook.
Environment variables to set for the hook.
This hook will run even if there are no matching files. Default is false.
If this hook fails, don't run any more hooks. Default is false.
Append filenames that would be checked to the hook entry as arguments. Default is true.
A description of the hook. For metadata only.
Run the hook on a specific version of the language.
Default is default.
See https://pre-commit.com/#overriding-language-version.
Write the output of the hook to a file when the hook fails or verbose is enabled.
This hook will execute using a single process instead of in parallel. Default is false.
Select which git hook(s) to run for. Default all stages are selected. See https://pre-commit.com/#confining-hooks-to-run-at-certain-stages.
Print the output of the hook even if it passes. Default is false.
The minimum version of prek required to run this hook.
Must be meta.
A meta hook predefined in prek.
Override the name of the hook.
Entry is not allowed for predefined hooks.
Language must be system for predefined hooks (or omitted).
Priority used by the scheduler to determine ordering and concurrency. Hooks with the same priority can run in parallel.
This is only allowed in project config files (e.g. .pre-commit-config.yaml).
It is not allowed in manifests (e.g. .pre-commit-hooks.yaml).
Not documented in the official docs.
A file pattern, either a regex or glob pattern(s).
A file pattern, either a regex or glob pattern(s).
List of file types to run on (AND).
Default is [file], which matches all files.
List of file types to run on (OR).
Default is [].
List of file types to exclude.
Default is [].
Not documented in the official docs.
Additional arguments to pass to the hook.
Environment variables to set for the hook.
This hook will run even if there are no matching files. Default is false.
If this hook fails, don't run any more hooks. Default is false.
Append filenames that would be checked to the hook entry as arguments. Default is true.
A description of the hook. For metadata only.
Run the hook on a specific version of the language.
Default is default.
See https://pre-commit.com/#overriding-language-version.
Write the output of the hook to a file when the hook fails or verbose is enabled.
This hook will execute using a single process instead of in parallel. Default is false.
Select which git hook(s) to run for. Default all stages are selected. See https://pre-commit.com/#confining-hooks-to-run-at-certain-stages.
Print the output of the hook even if it passes. Default is false.
The minimum version of prek required to run this hook.
Must be builtin.
A builtin hook predefined in prek.
Override the name of the hook.
Entry is not allowed for predefined hooks.
Language must be system for predefined hooks (or omitted).
Priority used by the scheduler to determine ordering and concurrency. Hooks with the same priority can run in parallel.
This is only allowed in project config files (e.g. .pre-commit-config.yaml).
It is not allowed in manifests (e.g. .pre-commit-hooks.yaml).
Not documented in the official docs.
A file pattern, either a regex or glob pattern(s).
A file pattern, either a regex or glob pattern(s).
List of file types to run on (AND).
Default is [file], which matches all files.
List of file types to run on (OR).
Default is [].
List of file types to exclude.
Default is [].
Not documented in the official docs.
Additional arguments to pass to the hook.
Environment variables to set for the hook.
This hook will run even if there are no matching files. Default is false.
If this hook fails, don't run any more hooks. Default is false.
Append filenames that would be checked to the hook entry as arguments. Default is true.
A description of the hook. For metadata only.
Run the hook on a specific version of the language.
Default is default.
See https://pre-commit.com/#overriding-language-version.
Write the output of the hook to a file when the hook fails or verbose is enabled.
This hook will execute using a single process instead of in parallel. Default is false.
Select which git hook(s) to run for. Default all stages are selected. See https://pre-commit.com/#confining-hooks-to-run-at-certain-stages.
Print the output of the hook even if it passes. Default is false.
The minimum version of prek required to run this hook.