Husky

Git hooks made easy

Description

Husky is an exlir version of the husky npm module.

Husky can prevent bad git commit, git push and more 🐶 ❤️ woof!

Installation

The Husky Hex package can be installed by adding husky to your list of dependencies in mix.exs:

defp deps do
  [
    {:husky, "~> 0.1.5"}
  ]
end

Usage

Configure Git Hooks Using config/config.exs:
use Mix.Config
config :husky,
    pre_commit: "mix format",
    pre_push: "mix test"

View example file config.example.exs

Configure Git Hooks Using .husky.json:
{
  "husky": {
    "hooks": {
      "pre_commit": "mix format",
      "pre_push": "mix test"
    }
  }
}

View example file .husky.example.json

Documentation can found at https://hexdocs.pm/husky.