Skip to content

Commit

Permalink
docs: info on installing pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed Jan 18, 2024
1 parent 8efdb29 commit c76c2fd
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions docs/dev-guide/pre-commit.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,21 @@ Git has **hooks**, which can run code on various events:

## Pre-Commit (Python Tool)

- Pre-commit is a Python tool for simplifying and applying Git pre-commit hooks.
- [Pre-commit](https://pre-commit.com/) is a Python tool for simplifying
and applying Git pre-commit hooks.
- Hooks can be configured via a YAML file, then applied on each attempted commit.
- There are many hooks available from different sources.

Install it with:

```bash
pip install pre-commit
```

### Add pre-commit-config.yaml

A best practice config file, taken from FMTM:
- Add a `pre-commit-config.yaml` to your repo root.
- A best practice config file, taken from FMTM:

```yaml
repos:
Expand Down

0 comments on commit c76c2fd

Please sign in to comment.