Skip to content

Commit

Permalink
Add Jane Street coding style linter
Browse files Browse the repository at this point in the history
  • Loading branch information
mukul-rathi committed Nov 9, 2019
1 parent c8fec2e commit 7b9773a
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
*.cmx
*.cmxs
*.cmxa
*.install

# ocamlbuild working directory
_build/
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ script:
- bash -ex .travis-ocaml.sh
- eval $(opam config env)
- make install
- dune build @fmt
- make lint
- make test
- make coverage
- bisect-ppx-report send-to Coveralls
Expand Down
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,16 @@ default:
opam install . --deps-only
dune build

build:
dune build

install:
opam install --yes . --deps-only

lint:
dune build @lint
dune build @fmt

test:
dune runtest

Expand Down
1 change: 1 addition & 0 deletions hello_world.opam
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ depends: [
"odoc"
"ocamlformat"
"bisect_ppx" {dev & >= "2.0.0"}
"ppx_js_style"
]

pin-depends: [
Expand Down
1 change: 1 addition & 0 deletions hooks/pre-commit
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/sh
make format
make lint
make clean
5 changes: 4 additions & 1 deletion src/dune
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
(library
(public_name hello_world)
(preprocess
(pps bisect_ppx --conditional)))
(pps bisect_ppx --conditional))
(lint
(pps ppx_js_style -check-doc-comments -annotated-ignores -styler -pretty
-dated-deprecation)))
5 changes: 4 additions & 1 deletion tests/dune
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
(test
(name test_hello_world)
(libraries hello_world alcotest qcheck qcheck-alcotest))
(libraries hello_world alcotest qcheck qcheck-alcotest)
(lint
(pps ppx_js_style -check-doc-comments -annotated-ignores -styler -pretty
-dated-deprecation)))

0 comments on commit 7b9773a

Please sign in to comment.