Skip to content

Commit ecbd848

Browse files
committed
Documentation for julia hooks
1 parent 2c9d289 commit ecbd848

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

sections/new-hooks.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,37 @@ This language supports `additional_dependencies` so it can be used as a
330330
__Support:__ haskell hooks are known to work on any system which has `cabal`
331331
installed. It has been tested on linux, macOS, and windows.
332332
333+
### julia
334+
335+
_new in 4.x.0_
336+
337+
The hook repository must contain a `Project.toml` file and optionally a `Manifest.toml`
338+
file. Hooks will run in this environment.
339+
340+
For configuring julia hooks, your [`entry`](#hooks-entry) should be a path to a julia source
341+
file relative to the hook repository (optionally with arguments).
342+
343+
For example:
344+
345+
```yaml
346+
- id: foo-without-args
347+
name: ...
348+
language: julia
349+
entry: bin/foo.jl
350+
- id: bar-with-args
351+
name: ...
352+
language: julia
353+
entry: bin/bar.jl --arg1 --arg2
354+
```
355+
356+
This language supports `additional_dependencies` so it can be used as a `repo: local` hook.
357+
`additional_dependencies` are passed to `pkg> add` and should be specified using
358+
[Pkg REPL mode syntax](https://pkgdocs.julialang.org/v1/repl/#repl-add).
359+
Note that `additional_dependencies` can be used to override package versions in the
360+
`Project.toml` file of the hook repository.
361+
362+
__Support:__ julia hooks are known to work on any system which has `julia` installed.
363+
333364
### lua
334365
335366
Lua hooks are installed with the version of Lua that is used by Luarocks.

0 commit comments

Comments
 (0)