prek
Configuration file for prek, a tool for managing git hooks
prek.toml
Validate
Check your file against this schema
Opens the validator with this schema already loaded. Paste your
prek.toml and it validates in your browser — nothing is uploaded.
Reference
Fields
Generated directly from the schema, following local
$refs, to two levels of nesting.
| Field | Type | Description |
|---|---|---|
update | object | Controls how `prek update` selects eligible releases. |
update.cooldown_days | integer | — |
update.freeze | boolean | — |
update.include_tags | anyOf | A configuration value that accepts either one string or a list of strings. |
update.exclude_tags | anyOf | A configuration value that accepts either one string or a list of strings. |
update.repos | object | — |
priorities | object | Configuration-local aliases for numeric hook priorities. |
reposrequired | array | — |
default_install_hook_types | array | A list of `--hook-types` which will be used by default when running `prek install`. Default is `[pre-commit]`. |
default_language_version | object | A mapping from language to the default `language_version`. |
default_language_version.bun | anyOf | — |
default_language_version.conda | anyOf | — |
default_language_version.coursier | anyOf | — |
default_language_version.dart | anyOf | — |
default_language_version.deno | anyOf | — |
default_language_version.docker | anyOf | — |
default_language_version.docker_image | anyOf | — |
default_language_version.dotnet | anyOf | — |
default_language_version.fail | anyOf | — |
default_language_version.golang | anyOf | — |
default_language_version.haskell | anyOf | — |
default_language_version.julia | anyOf | — |
default_language_version.lua | anyOf | — |
default_language_version.mise | anyOf | — |
default_language_version.node | anyOf | — |
default_language_version.perl | anyOf | — |
default_language_version.php | anyOf | — |
default_language_version.pygrep | anyOf | — |
default_language_version.python | anyOf | — |
default_language_version.r | anyOf | — |
default_language_version.ruby | anyOf | — |
default_language_version.rust | anyOf | — |
default_language_version.script | anyOf | — |
default_language_version.swift | anyOf | — |
default_language_version.system | anyOf | — |
default_stages | array | A configuration-wide default for the stages property of hooks. Default to all stages. |
default_env | object | Default runtime environment variables for hooks. |
files | oneOf | A file pattern, either a regex or glob pattern(s). |
exclude | oneOf | A file pattern, either a regex or glob pattern(s). |
fail_fast | boolean | Set to true to have prek stop running hooks after the first failure. Default is false. |
minimum_prek_version | string | The minimum version of prek required to run this configuration. |
orphan | boolean | 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 |
Audit
What we found in this schema
- Declared draft: draft-07
- Validates cleanly against its own meta-schema.
- 163 properties, 73% carrying a description, max nesting depth 10.
Standards
Specification sections for the keywords in this schema
| Keyword | Document | Section |
|---|---|---|
$ref | JSON Schema Core, draft 2020-12 | §8.2.3.1 — Direct References with "$ref" |
additionalProperties | JSON Schema Core, draft 2020-12 | §10.3.2.3 — "additionalProperties" |
const | JSON Schema Validation, draft 2020-12 | §6.1.3 — "const" |
description | JSON Schema Validation, draft 2020-12 | §9.1 — "title" and "description" |
enum | JSON Schema Validation, draft 2020-12 | §6.1.2 — "enum" |
items | JSON Schema Core, draft 2020-12 | §10.3.1.2 — "items" |
oneOf | JSON Schema Core, draft 2020-12 | §10.2.1.3 — "oneOf" |
pattern | JSON Schema Validation, draft 2020-12 | §6.3.3 — "pattern" |
properties | JSON Schema Core, draft 2020-12 | §10.3.2.1 — "properties" |
required | JSON Schema Validation, draft 2020-12 | §6.5.3 — "required" |
type | JSON Schema Validation, draft 2020-12 | §6.1.1 — "type" |
uniqueItems | JSON Schema Validation, draft 2020-12 | §6.4.3 — "uniqueItems" |
Documents
- JSON Schema Core, draft 2020-12 — JSON Schema: A Media Type for Describing JSON Documents, A. Wright, H. Andrews, B. Hutton, G. Dennis, Eds., 2022. draft-bhutton-json-schema-01. An expired Internet-Draft with no formal standing in the IETF standards process; it is nonetheless the specification of record for JSON Schema 2020-12, published by json-schema.org.
- JSON Schema Validation, draft 2020-12 — JSON Schema Validation: A Vocabulary for Structural Validation of JSON, A. Wright, H. Andrews, B. Hutton, Eds., 2022.
- RFC 8259 (STD 90) — The JavaScript Object Notation (JSON) Data Interchange Format, T. Bray, Ed., 2017. The format a schema describes.
- RFC 6901 — JavaScript Object Notation (JSON) Pointer. Defines the pointer syntax used by $ref fragments and the ~0 / ~1 escapes.
Source
Attribution
This schema comes from SchemaStore, distributed under the Apache License 2.0. Copyright 2015–present Mads Kristensen and contributors. View the original file. The field table and audit on this page are generated by JSONTools.tools; the schema itself is unmodified.