-
-
Notifications
You must be signed in to change notification settings - Fork 309
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
See pre-commit PR: pre-commit/pre-commit#3348
- Loading branch information
1 parent
0e459e7
commit 2134a7e
Showing
1 changed file
with
19 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -332,15 +332,22 @@ installed. It has been tested on linux, macOS, and windows. | |
### julia | ||
_new in 4.x.0_ | ||
The hook repository must contain a `Project.toml` file and optionally a `Manifest.toml` | ||
file. Hooks will run in this environment. | ||
_new in 4.1.0_ | ||
For configuring julia hooks, your [`entry`](#hooks-entry) should be a path to a julia source | ||
file relative to the hook repository (optionally with arguments). | ||
For example: | ||
Hooks run in an isolated package environment defined by a `Project.toml` file (optionally | ||
with a `Manifest.toml` file) in the hook repository. If no `Project.toml` file is found the | ||
hook is run in an empty environment. | ||
Julia hooks support [`additional_dependencies`](#config-additional_dependencies) which can | ||
be used to augment, or override, the existing environment in the hooks repository. This also | ||
means that julia can be used as a `repo: local` hook. `additional_dependencies` are passed | ||
to `pkg> add` and should be specified using | ||
[Pkg REPL mode syntax](https://pkgdocs.julialang.org/v1/repl/#repl-add). | ||
Examples: | ||
```yaml | ||
- id: foo-without-args | ||
|
@@ -351,14 +358,15 @@ For example: | |
name: ... | ||
language: julia | ||
entry: bin/bar.jl --arg1 --arg2 | ||
- id: baz-with-extra-deps | ||
name: ... | ||
language: julia | ||
entry: bin/baz.jl | ||
additional_dependencies: | ||
- 'ExtraDepA@1' | ||
- '[email protected]' | ||
``` | ||
This language supports `additional_dependencies` so it can be used as a `repo: local` hook. | ||
`additional_dependencies` are passed to `pkg> add` and should be specified using | ||
[Pkg REPL mode syntax](https://pkgdocs.julialang.org/v1/repl/#repl-add). | ||
Note that `additional_dependencies` can be used to override package versions in the | ||
`Project.toml` file of the hook repository. | ||
__Support:__ julia hooks are known to work on any system which has `julia` installed. | ||
|
||
### lua | ||
|