mirror of
https://github.com/ocaml-tracing/ocaml-opentelemetry.git
synced 2026-03-13 14:06:32 -04:00
add pre-commit hook for formatting
Some checks are pending
format / format (push) Waiting to run
build / build (4.08.x, ubuntu-latest) (push) Waiting to run
build / build (4.13.x, ubuntu-latest) (push) Waiting to run
build / build (5.0.x, ubuntu-latest) (push) Waiting to run
build / build (5.3.x, ubuntu-latest) (push) Waiting to run
Some checks are pending
format / format (push) Waiting to run
build / build (4.08.x, ubuntu-latest) (push) Waiting to run
build / build (4.13.x, ubuntu-latest) (push) Waiting to run
build / build (5.0.x, ubuntu-latest) (push) Waiting to run
build / build (5.3.x, ubuntu-latest) (push) Waiting to run
This commit is contained in:
parent
ceb3fb75f8
commit
2c52df1fae
2 changed files with 13 additions and 0 deletions
10
.pre-commit-config.yaml
Normal file
10
.pre-commit-config.yaml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
repos:
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: ocamlformat
|
||||
name: ocamlformat check
|
||||
entry: make format-check
|
||||
language: system
|
||||
files: \.(ml|mli)$
|
||||
pass_filenames: false
|
||||
stages: [pre-push]
|
||||
3
Makefile
3
Makefile
|
|
@ -29,6 +29,9 @@ format:
|
|||
format-check:
|
||||
@dune build $(DUNE_OPTS) @fmt --display=quiet
|
||||
|
||||
setup-githooks:
|
||||
uvx pre-commit install --hook-type pre-push
|
||||
|
||||
WATCH ?= @all
|
||||
watch:
|
||||
@dune build $(WATCH) -w $(OPTS)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue