/pre-commit-hooks

Pre-commit hooks

MIT LicenseMIT

Pre-commit hooks

Pre-commit hooks based on pre-commit

Installation

With pip

$ pip install pre-commit

With curl

$ curl https://pre-commit.com/install-local.py | python -

More installation options

See pre-commit official docs

Usage

Create pre-commit config file

Example content of .pre-commit-config.yaml

repos:
  - repo: git://github.com/4ops/pre-commit-hooks
    rev: v1.1.1
    hooks:
        - id: terraform-fmt
        - id: packer-fmt

Install hooks

$ pre-commit install

Manual run

$ pre-commit run -a