Skip to content

Commit 15dd6ab

Browse files
committed
feat!: add Makefile rule for formatting
1 parent ff9f091 commit 15dd6ab

File tree

119 files changed

+14434
-13192
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+14434
-13192
lines changed

.ocamlformat

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
profile = default
2+
sequence-style = terminator
3+
field-space = loose

Makefile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,19 @@ all: static build
33
DUNE = dune
44
DUNE_ARGS = --profile=release
55

6+
FORMATER = ocamlformat
7+
SRC = src/**/*.ml
8+
69
build-deps:
710
opam install . --deps-only --locked
811

9-
.PHONY: build
10-
build:
12+
.PHONY: build format
13+
build: format
1114
@${DUNE} build ${DUNE_ARGS}
1215

16+
format:
17+
@${FORMATER} -i $(SRC) $(SRC:.ml=.mli)
18+
1319
.PHONY: static
1420
static:
1521
@${MAKE} -C static

learn-ocaml-client.opam

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ depends: [
3131
"lwt_ssl"
3232
"ocaml" {= "4.05.0"}
3333
"ocamlfind" {build}
34+
"ocamlformat" {= "0.8"}
3435
"ocp-indent-nlfork"
3536
"ocp-ocamlres" {>= "0.4"}
3637
"ocplib-json-typed" {= "0.6"}

learn-ocaml.opam

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ depends: [
4242
"markup-lwt"
4343
"ocaml" {= "4.05.0"}
4444
"ocamlfind" {build}
45+
"ocamlformat" {= "0.8"}
4546
"ocp-indent-nlfork"
4647
"ocp-ocamlres" {>= "0.4"}
4748
"ocplib-json-typed" {= "0.6"}

0 commit comments

Comments
 (0)