Configure and manage git hooks in Elixir projects to enforce code quality and automate workflows.
GitHooks is an Elixir library that simplifies the configuration and management of git hooks within Elixir projects. It enables developers to automate tasks like running tests, formatters, and linters directly through git hooks, ensuring code consistency and catching errors early in the development cycle.
Elixir developers and teams working on Elixir projects who want to enforce code quality standards and automate repetitive tasks in their git workflow.
Developers choose GitHooks for its simplicity in automatic installation and flexibility in defining hooks using bash commands, executable files, Elixir modules, or mix tasks, supporting all standard git hooks out of the box with branch control and backup safety.
🪝 Add git hooks to Elixir projects
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Hooks are installed automatically from Elixir config with auto_install: true, reducing setup time as per the configuration example.
Supports mix tasks, bash commands, executable files, and Elixir modules, allowing diverse automation methods detailed in the task types section.
Works with all standard git hooks out of the box, ensuring no limitations on git workflows according to the README.
Enables whitelisting or blacklisting branches using regex for granular control, as shown in the example config with feature branches.
Automatically backs up existing hooks before overwriting with .pre_git_hooks_backup files, preventing data loss as highlighted in the installation section.
Requires Elixir and Mix, making it irrelevant for non-Elixir projects or teams using other stacks, limiting its applicability.
Setting up custom paths, Docker integration, or submodules involves manual tweaks and troubleshooting, as admitted in the custom mix path and troubleshooting sections.
Primarily configured for :dev only in dependencies, so it's not designed for production or CI/CD pipelines without additional work.
While backups are created, the README lacks clear instructions on restoring them, which could confuse users in case of issues.