Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 37 additions & 12 deletions src/schemas/json/prek.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,17 @@
"$ref": "#/definitions/UpdateOptions",
"description": "Default settings for `prek update` in this project."
},
"priorities": {
"description": "Configuration-local aliases for numeric hook priorities.",
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^\\S+$": {
"type": "integer",
"minimum": 0
}
}
},
"repos": {
"type": "array",
"items": {
Expand Down Expand Up @@ -261,9 +272,8 @@
"description": "Override the language. Not documented in the official docs but works."
},
"priority": {
"description": "Priority used by the scheduler to determine ordering and concurrency.\nHooks with the same priority can run in parallel.\n\nThis is only allowed in project config files (e.g. `.pre-commit-config.yaml`).\nIt is not allowed in manifests (e.g. `.pre-commit-hooks.yaml`).",
"type": "integer",
"minimum": 0
"$ref": "#/definitions/Priority",
"description": "Priority used by the scheduler to determine ordering and concurrency.\nHooks with the same priority can run in parallel.\n\nThis is only allowed in project config files (e.g. `.pre-commit-config.yaml`).\nIt is not allowed in manifests (e.g. `.pre-commit-hooks.yaml`)."
},
"groups": {
"description": "User-defined hook groups used by `prek run --group` and `--no-group`.\nGroup names cannot be empty or contain whitespace.",
Expand Down Expand Up @@ -411,6 +421,21 @@
"system"
]
},
"Priority": {
"anyOf": [
{
"type": "integer",
"minimum": 0
},
{
"$ref": "#/definitions/PriorityAlias"
}
]
},
"PriorityAlias": {
"type": "string",
"pattern": "^\\S+$"
},
"FilePattern": {
"description": "A file pattern, either a regex or glob pattern(s).",
"oneOf": [
Expand Down Expand Up @@ -514,9 +539,8 @@
"description": "The language of the hook. Tells prek how to install and run the hook."
},
"priority": {
"description": "Priority used by the scheduler to determine ordering and concurrency.\nHooks with the same priority can run in parallel.",
"type": "integer",
"minimum": 0
"$ref": "#/definitions/Priority",
"description": "Priority used by the scheduler to determine ordering and concurrency.\nHooks with the same priority can run in parallel."
},
"groups": {
"description": "User-defined hook groups used by `prek run --group` and `--no-group`.\nGroup names cannot be empty or contain whitespace.",
Expand Down Expand Up @@ -675,9 +699,8 @@
"enum": ["system"]
},
"priority": {
"description": "Priority used by the scheduler to determine ordering and concurrency.\nHooks with the same priority can run in parallel.\n\nThis is only allowed in project config files (e.g. `.pre-commit-config.yaml`).\nIt is not allowed in manifests (e.g. `.pre-commit-hooks.yaml`).",
"type": "integer",
"minimum": 0
"$ref": "#/definitions/Priority",
"description": "Priority used by the scheduler to determine ordering and concurrency.\nHooks with the same priority can run in parallel.\n\nThis is only allowed in project config files (e.g. `.pre-commit-config.yaml`).\nIt is not allowed in manifests (e.g. `.pre-commit-hooks.yaml`)."
},
"groups": {
"description": "User-defined hook groups used by `prek run --group` and `--no-group`.\nGroup names cannot be empty or contain whitespace.",
Expand Down Expand Up @@ -840,9 +863,8 @@
"enum": ["system"]
},
"priority": {
"description": "Priority used by the scheduler to determine ordering and concurrency.\nHooks with the same priority can run in parallel.\n\nThis is only allowed in project config files (e.g. `.pre-commit-config.yaml`).\nIt is not allowed in manifests (e.g. `.pre-commit-hooks.yaml`).",
"type": "integer",
"minimum": 0
"$ref": "#/definitions/Priority",
"description": "Priority used by the scheduler to determine ordering and concurrency.\nHooks with the same priority can run in parallel.\n\nThis is only allowed in project config files (e.g. `.pre-commit-config.yaml`).\nIt is not allowed in manifests (e.g. `.pre-commit-hooks.yaml`)."
},
"groups": {
"description": "User-defined hook groups used by `prek run --group` and `--no-group`.\nGroup names cannot be empty or contain whitespace.",
Expand Down Expand Up @@ -977,6 +999,7 @@
"check-vcs-permalinks",
"check-xml",
"check-yaml",
"deny-pattern",
"destroyed-symlinks",
"detect-private-key",
"end-of-file-fixer",
Expand All @@ -986,6 +1009,8 @@
"mixed-line-ending",
"no-commit-to-branch",
"pretty-format-json",
"require-pattern",
"requirements-txt-fixer",
"trailing-whitespace"
]
},
Expand Down