Add elixir to pre-commit

This commit is contained in:
Jamil Bou Kheir
2020-05-04 23:53:58 -07:00
parent ef8ef54999
commit 63da9a2beb

View File

@@ -1,7 +1,33 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
# Elixir config
- repo: local
hooks:
- id: mix-format
name: 'elixir: mix format'
entry: mix format --check-formatted
language: system
files: \.exs*$
- id: mix-lint
name: 'elixir: mix credo'
entry: mix credo --strict
language: system
pass_filenames: false
files: \.exs*$
- id: mix-compile
name: 'elixir: mix compile'
entry: mix compile --force --warnings-as-errors
language: system
pass_filenames: false
files: \.ex$
# Standard pre-commit hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-yaml
- id: check-merge-conflict
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-merge-conflict
- id: no-commit-to-branch
args: [-b, master, -b, develop]