Skip to content

arenadotio/pre-commit-ocamlformat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

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/"

Releases

No releases published

Packages

No packages published