GitHub - arenadotio/pre-commit-ocamlformat: ocamlformat hook for pre-commit · GitHub
Skip to content

Latest commit

 

History

4 Commits

Folders and files

Repository files navigation

This repo contains a pre-commit hook for ocamlformat.

Setup

This doesn't sandbox the command at all, so you'll need ocamlformat available locally:

opam install ocamlformat

Note: There's a docker branch which sandboxes this, but it's a lot slower and barely tested.

Usage

In your .pre-commit-config.yaml:

- repo: https://github.com/arenadotio/pre-commit-ocamlformat
  rev: master # or pick a commit sha I guess
  hooks:
    - id: ocamlformat

Note: ocamlformat will get confused if you try to run it against vendored files, so you may need add an exclude filter like:

- repo: https://github.com/arenadotio/pre-commit-ocamlformat
  rev: master
  hooks:
    - id: ocamlformat
      exclude: "^vendor/"

About

ocamlformat hook for pre-commit

Topics

Resources

Stars

3 stars

Watchers

9 watching

Forks

Releases

Packages

Used by

Contributors