LaunchPlatform / beancount-black

Opinionated code formatter, just like Python's black code formatter but for Beancount
MIT License
37 stars 3 forks source link

Add pre-commit-hook #17

Closed jtmiclat closed 9 months ago

jtmiclat commented 9 months ago

Hi!

Thanks for this repo! I thought of adding a pre-commit hook to make it run whenever someone commits a beancount file to git.

Example usage

Create a .pre-commit-config.yaml Note: the rev and repo link would change

repos:
  - repo: https://github.com/jtmiclat/beancount-black # to be changed to https://github.com/LaunchPlatform/beancount-black
    rev: b1e97d9 
    hooks:
      - id: beancount-black

Run pre-commit run -a or install the hook using pre-commit install