diff --git a/.githooks/pre-commit b/.githooks/pre-commit new file mode 100644 index 0000000000..8752801247 --- /dev/null +++ b/.githooks/pre-commit @@ -0,0 +1 @@ +julia --color=yes dev/flux_format.jl --verbose . diff --git a/dev/Project.toml b/dev/Project.toml index f3aab8b8bf..24d6711c07 100644 --- a/dev/Project.toml +++ b/dev/Project.toml @@ -1,2 +1,4 @@ [deps] +Flux = "587475ba-b771-5e3f-ad9e-33799f191a9c" +Git = "d7ba0133-e1db-5d97-8f8c-041e4b3a1eb2" JuliaFormatter = "98e50ef6-434e-11e9-1051-2b60c6c9e899" diff --git a/dev/setup.jl b/dev/setup.jl new file mode 100644 index 0000000000..baf0efdb15 --- /dev/null +++ b/dev/setup.jl @@ -0,0 +1,9 @@ +# setup the custom git hook +using Git + +# set the local hooks path +const git = Git.git() +run(`$git config --local core.hooksPath .githooks/`) + +# set file permission for hook +Base.Filesystem.chmod(".githooks", 0o777; recursive = true)