Skip to content

Commit ed4f60b

Browse files
committed
documentation updates for 4.4.0
1 parent 0aa540d commit ed4f60b

File tree

3 files changed

+21
-17
lines changed

3 files changed

+21
-17
lines changed

sections/advanced.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ For example:
272272
hooks:
273273
- id: check-requirements
274274
name: check requirements files
275-
language: system
275+
language: unsupported
276276
entry: python -m scripts.check_requirements --compare
277277
files: ^requirements.*\.txt$
278278
```
@@ -291,7 +291,7 @@ You can configure repository-local hooks by specifying the [`repo`](#repos-repo)
291291
sentinel `local`.
292292

293293
local hooks can use any language which supports [`additional_dependencies`](#config-additional_dependencies)
294-
or [`docker_image`](#docker_image) / [`fail`](#fail) / [`pygrep`](#pygrep) / [`script`](#script) / [`system`](#system).
294+
or [`docker_image`](#docker_image) / [`fail`](#fail) / [`pygrep`](#pygrep) / [`unsupported`](#unsupported) / [`unsupported_script`](#unsupported_script).
295295
This enables you to install things which previously would require a trivial
296296
mirror repository.
297297

@@ -307,13 +307,13 @@ Here's an example configuration with a few `local` hooks:
307307
- id: pylint
308308
name: pylint
309309
entry: pylint
310-
language: system
310+
language: unsupported
311311
types: [python]
312312
require_serial: true
313313
- id: check-x
314314
name: Check X
315315
entry: ./bin/check-x.sh
316-
language: script
316+
language: unsupported_script
317317
files: \.x$
318318
- id: scss-lint
319319
name: scss-lint

sections/hooks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ you may send [a pull request] to expand this list however there are a few
161161
requirements you *must* follow or your PR will be closed without comment:
162162

163163
- the tool must already be fairly popular (>500 stars)
164-
- the tool must use a managed language (no `system` / `script` / `docker` hooks)
164+
- the tool must use a managed language (no `unsupported` / `unsupported_script` / `docker` hooks)
165165
- the tool must operate on files
166166

167167
[a pull request]: https://github.com/pre-commit/pre-commit.com/blob/main/sections/hooks.md

sections/new-hooks.md

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ Hello from foo hook!
155155
- [rust](#rust)
156156
- [swift](#swift)
157157
- [pygrep](#pygrep)
158-
- [script](#script)
159-
- [system](#system)
158+
- [unsupported](#unsupported)
159+
- [unsupported_script](#unsupported_scripts)
160160

161161
### conda
162162

@@ -492,23 +492,27 @@ To require all files to match, use `args: [--negate]`.
492492
__Support:__ pygrep hooks are supported on all platforms which pre-commit runs
493493
on.
494494

495-
### script
495+
### unsupported
496496

497-
Script hooks provide a way to write simple scripts which validate files. The
498-
[`entry`](#hooks-entry) should be a path relative to the root of the hook repository.
497+
[anchor](__#system)
498+
_new in 4.4.0_: previously `language: system`. the alias will be removed in a
499+
future version
500+
501+
System hooks provide a way to write hooks for system-level executables which
502+
don't have a supported language above (or have special environment
503+
requirements that don't allow them to run in isolation such as pylint).
499504

500505
This hook type will not be given a virtual environment to work with – if it
501506
needs additional dependencies the consumer must install them manually.
502507

503-
__Support:__ the support of script hooks depend on the scripts themselves.
508+
### unsupported_script
504509

505-
### system
510+
[anchor](__#script)
511+
_new in 4.4.0_: previously `language: script`. the alias will be removed in a
512+
future version
506513

507-
System hooks provide a way to write hooks for system-level executables which
508-
don't have a supported language above (or have special environment
509-
requirements that don't allow them to run in isolation such as pylint).
514+
Script hooks provide a way to write simple scripts which validate files. The
515+
[`entry`](#hooks-entry) should be a path relative to the root of the hook repository.
510516

511517
This hook type will not be given a virtual environment to work with – if it
512518
needs additional dependencies the consumer must install them manually.
513-
514-
__Support:__ the support of system hooks depend on the executables.

0 commit comments

Comments
 (0)