[build] make dune format files when testing

Summary:
This is needed to make dune auto-updating of unit tests introduced in
the next diff cohabit peacefully with our tests to make sure code stays
correctly formatted wrt ocamlformat.

Also, more auto-formatting = better.

Reviewed By: da319

Differential Revision: D22865004

fbshipit-source-id: 91c47ab08
master
Jules Villard 4 years ago committed by Facebook GitHub Bot
parent a64f311ea8
commit 7ccec3fd99

@ -7,10 +7,12 @@
(name IR)
(public_name infer.IR)
(flags
(:standard -open Core -open IStdlib -open IStd -open ATDGenerated
-open IBase))
(:standard -open Core -open IStdlib -open IStd -open ATDGenerated -open
IBase))
(libraries core zarith IStdlib ATDGenerated IBase)
(preprocess
(pps ppx_compare)))
(documentation (package infer) (mld_files IR))
(documentation
(package infer)
(mld_files IR))

@ -91,7 +91,8 @@ test: BUILD_MODE = test
test: $(SRC_BUILD_COMMON) $(MAKEFILE_LIST)
$(QUIET)$(DUNE_BUILD) \
$(patsubst %.exe, %.bc.exe, $(INFER_CONFIG_TARGETS)) \
scripts/$(CHECKCOPYRIGHT_MAIN).bc.exe $(INFERUNIT_MAIN).bc.exe $(INFERTOP_MAIN).bc.exe
scripts/$(CHECKCOPYRIGHT_MAIN).bc.exe $(INFERUNIT_MAIN).bc.exe $(INFERTOP_MAIN).bc.exe \
@fmt --auto-promote
.PHONY: doc
doc: $(SRC_BUILD_COMMON) $(MAKEFILE_LIST)

@ -10,7 +10,9 @@
(:standard -open Core -open IR -open IStdlib -open IStd -open ATDGenerated
-open IBase))
(libraries core IStdlib ATDGenerated IBase IR)
(preprocess (pps ppx_compare))
)
(preprocess
(pps ppx_compare)))
(documentation (package infer) (mld_files Absint))
(documentation
(package infer)
(mld_files Absint))

@ -12,72 +12,79 @@
(preprocess
(pps ppx_compare)))
(documentation (package infer) (mld_files ATDGenerated))
(documentation
(package infer)
(mld_files ATDGenerated))
; Rules below are boilerplatey, but this is benign and very easy to
; understand boilerplate.
; ATD for jsonbug
(rule
(targets jsonbug_j.ml
jsonbug_j.mli)
(deps jsonbug.atd)
(action (run atdgen -j -j-std %{deps})))
(targets jsonbug_j.ml jsonbug_j.mli)
(deps jsonbug.atd)
(action
(run atdgen -j -j-std %{deps})))
(rule
(targets jsonbug_t.ml
jsonbug_t.mli)
(deps jsonbug.atd)
(action (run atdgen -t %{deps})))
(targets jsonbug_t.ml jsonbug_t.mli)
(deps jsonbug.atd)
(action
(run atdgen -t %{deps})))
; ATD for runstate
(rule
(targets runstate_j.ml
runstate_j.mli)
(deps runstate.atd)
(action (run atdgen -j -j-std %{deps})))
(targets runstate_j.ml runstate_j.mli)
(deps runstate.atd)
(action
(run atdgen -j -j-std %{deps})))
(rule
(targets runstate_t.ml
runstate_t.mli)
(deps runstate.atd)
(action (run atdgen -t %{deps})))
(targets runstate_t.ml runstate_t.mli)
(deps runstate.atd)
(action
(run atdgen -t %{deps})))
; ATD for java_method_decl
(rule
(targets java_method_decl_j.ml
java_method_decl_j.mli)
(deps java_method_decl.atd)
(action (run atdgen -j -j-std %{deps})))
(targets java_method_decl_j.ml java_method_decl_j.mli)
(deps java_method_decl.atd)
(action
(run atdgen -j -j-std %{deps})))
(rule
(targets java_method_decl_t.ml
java_method_decl_t.mli)
(deps java_method_decl.atd)
(action (run atdgen -t %{deps})))
(targets java_method_decl_t.ml java_method_decl_t.mli)
(deps java_method_decl.atd)
(action
(run atdgen -t %{deps})))
; ATD for java_profiler_samples
(rule
(targets java_profiler_samples_j.ml
java_profiler_samples_j.mli)
(deps java_profiler_samples.atd)
(action (run atdgen -j -j-std %{deps})))
(targets java_profiler_samples_j.ml java_profiler_samples_j.mli)
(deps java_profiler_samples.atd)
(action
(run atdgen -j -j-std %{deps})))
(rule
(targets java_profiler_samples_t.ml
java_profiler_samples_t.mli)
(deps java_profiler_samples.atd)
(action (run atdgen -t %{deps})))
(targets java_profiler_samples_t.ml java_profiler_samples_t.mli)
(deps java_profiler_samples.atd)
(action
(run atdgen -t %{deps})))
; ATD for clang_profiler_samples
(rule
(targets clang_profiler_samples_j.ml
clang_profiler_samples_j.mli)
(deps clang_profiler_samples.atd)
(action (run atdgen -j -j-std %{deps})))
(targets clang_profiler_samples_j.ml clang_profiler_samples_j.mli)
(deps clang_profiler_samples.atd)
(action
(run atdgen -j -j-std %{deps})))
(rule
(targets clang_profiler_samples_t.ml
clang_profiler_samples_t.mli)
(deps clang_profiler_samples.atd)
(action (run atdgen -t %{deps})))
(targets clang_profiler_samples_t.ml clang_profiler_samples_t.mli)
(deps clang_profiler_samples.atd)
(action
(run atdgen -t %{deps})))

@ -7,14 +7,15 @@
(name Backend)
(public_name infer.Backend)
(flags
(:standard
-open Core -open IStdlib -open IStd -open OpenSource -open ATDGenerated
-open IBase -open IR -open Absint -open Biabduction -open BO -open Nullsafe
-open Pulselib -open Checkers -open Costlib -open Quandary -open TOPLlib
-open Concurrency -open Labs))
(:standard -open Core -open IStdlib -open IStd -open OpenSource -open
ATDGenerated -open IBase -open IR -open Absint -open Biabduction -open BO
-open Nullsafe -open Pulselib -open Checkers -open Costlib -open Quandary
-open TOPLlib -open Concurrency -open Labs))
(libraries core IStdlib ATDGenerated IBase IR Absint Biabduction Nullsafe BO
Checkers Costlib Quandary TOPLlib Concurrency Labs)
(preprocess (pps ppx_compare ppx_fields_conv))
)
Checkers Costlib Quandary TOPLlib Concurrency Labs)
(preprocess
(pps ppx_compare ppx_fields_conv)))
(documentation (package infer) (mld_files Backend))
(documentation
(package infer)
(mld_files Backend))

@ -6,14 +6,17 @@
(library
(name IBase)
(public_name infer.IBase)
(flags (:standard -open Core -open IStdlib -open IStd -open ATDGenerated -open OpenSource))
(flags
(:standard -open Core -open IStdlib -open IStd -open ATDGenerated -open
OpenSource))
(libraries cmdliner core mtime.clock.os parmap re sqlite3 zip ATDGenerated
IStdlib OpenSource)
(preprocess
(pps ppx_blob ppx_compare ppx_enumerate))
(preprocessor_deps
(glob_files ../../documentation/checkers/*.md)
(glob_files ../../documentation/issues/*.md))
)
(glob_files ../../documentation/issues/*.md)))
(documentation (package infer) (mld_files IBase))
(documentation
(package infer)
(mld_files IBase))

@ -10,5 +10,5 @@
(:standard -open Core -open IR -open IStdlib -open IStd -open ATDGenerated
-open IBase -open Absint))
(libraries core IStdlib ATDGenerated IBase IR Absint)
(preprocess (pps ppx_compare))
)
(preprocess
(pps ppx_compare)))

@ -7,8 +7,8 @@
(name BO)
(public_name infer.BO)
(flags
(:standard -open Core -open OpenSource -open IR -open IStdlib -open IStd -open ATDGenerated
-open IBase -open Absint -open Biabduction))
(:standard -open Core -open OpenSource -open IR -open IStdlib -open IStd
-open ATDGenerated -open IBase -open Absint -open Biabduction))
(libraries base64 core IStdlib ATDGenerated IBase IR Absint Biabduction)
(preprocess (pps ppx_compare))
)
(preprocess
(pps ppx_compare)))

@ -7,10 +7,14 @@
(name Checkers)
(public_name infer.Checkers)
(flags
(:standard -open Core -open OpenSource -open IR -open IStdlib -open IStd -open ATDGenerated
-open IBase -open Absint -open Biabduction -open BO -open Pulselib))
(libraries base64 core ocamlgraph IStdlib ATDGenerated IBase IR Absint Biabduction BO Pulselib)
(preprocess (pps ppx_compare))
)
(:standard -open Core -open OpenSource -open IR -open IStdlib -open IStd
-open ATDGenerated -open IBase -open Absint -open Biabduction -open BO
-open Pulselib))
(libraries base64 core ocamlgraph IStdlib ATDGenerated IBase IR Absint
Biabduction BO Pulselib)
(preprocess
(pps ppx_compare)))
(documentation (package infer) (mld_files Checkers))
(documentation
(package infer)
(mld_files Checkers))

@ -9,6 +9,7 @@
(flags
(:standard -open Core -open IR -open IStdlib -open IStd -open ATDGenerated
-open IBase -open ClangFrontend -open ASTLanguage))
(libraries oUnit core IStdlib ATDGenerated IBase IR ClangFrontend ASTLanguage)
(preprocess (pps ppx_compare))
)
(libraries oUnit core IStdlib ATDGenerated IBase IR ClangFrontend
ASTLanguage)
(preprocess
(pps ppx_compare)))

@ -10,5 +10,5 @@
(:standard -open Core -open OpenSource -open IR -open IStdlib -open IStd
-open ATDGenerated -open IBase -open Absint))
(libraries base64 core IStdlib ATDGenerated IBase IR Absint)
(preprocess (pps ppx_compare))
)
(preprocess
(pps ppx_compare)))

@ -10,5 +10,5 @@
(:standard -open Core -open OpenSource -open IR -open IStdlib -open IStd
-open ATDGenerated -open IBase -open Absint -open BO -open Checkers))
(libraries core IStdlib ATDGenerated IBase IR Absint BO Checkers)
(preprocess (pps ppx_compare))
)
(preprocess
(pps ppx_compare)))

@ -6,10 +6,12 @@
(executable
(name all_infer_in_one_file)
(modes byte)
(flags (:standard -w +60))
(flags
(:standard -w +60))
(libraries javalib ANSITerminal async atdgen base base64 cmdliner core
mtime.clock.os ocamlgraph oUnit parmap re sawja sqlite3 str unix xmlm
yojson zarith zip CStubs)
(modules All_infer_in_one_file)
(preprocess (pps ppx_blob ppx_compare ppx_enumerate ppx_fields_conv ppx_hash ppx_sexp_conv ppx_variants_conv -no-check))
)
(preprocess
(pps ppx_blob ppx_compare ppx_enumerate ppx_fields_conv ppx_hash
ppx_sexp_conv ppx_variants_conv -no-check)))

@ -12,4 +12,6 @@
(preprocess
(pps ppx_compare)))
(documentation (package infer) (mld_files IStdlib))
(documentation
(package infer)
(mld_files IStdlib))

@ -7,7 +7,7 @@
(name Labs00)
(flags
(:standard -open Core -open IR -open IStdlib -open IStd -open ATDGenerated
-open IBase -open Absint))
-open IBase -open Absint))
(libraries core IStdlib ATDGenerated IBase IR Absint)
(preprocess (pps ppx_compare))
)
(preprocess
(pps ppx_compare)))

@ -7,7 +7,7 @@
(name Labs01)
(flags
(:standard -open Core -open IR -open IStdlib -open IStd -open ATDGenerated
-open IBase -open Absint))
-open IBase -open Absint))
(libraries core IStdlib ATDGenerated IBase IR Absint)
(preprocess (pps ppx_compare))
)
(preprocess
(pps ppx_compare)))

@ -7,7 +7,7 @@
(name Labs02)
(flags
(:standard -open Core -open IR -open IStdlib -open IStd -open ATDGenerated
-open IBase -open Absint))
-open IBase -open Absint))
(libraries core IStdlib ATDGenerated IBase IR Absint)
(preprocess (pps ppx_compare))
)
(preprocess
(pps ppx_compare)))

@ -7,7 +7,7 @@
(name Labs03)
(flags
(:standard -open Core -open IR -open IStdlib -open IStd -open ATDGenerated
-open IBase -open Absint))
-open IBase -open Absint))
(libraries core IStdlib ATDGenerated IBase IR Absint)
(preprocess (pps ppx_compare))
)
(preprocess
(pps ppx_compare)))

@ -7,7 +7,7 @@
(name Labs04)
(flags
(:standard -open Core -open IR -open IStdlib -open IStd -open ATDGenerated
-open IBase -open Absint))
-open IBase -open Absint))
(libraries core IStdlib ATDGenerated IBase IR Absint)
(preprocess (pps ppx_compare))
)
(preprocess
(pps ppx_compare)))

@ -7,7 +7,7 @@
(name Labs05)
(flags
(:standard -open Core -open IR -open IStdlib -open IStd -open ATDGenerated
-open IBase -open Absint))
-open IBase -open Absint))
(libraries core IStdlib ATDGenerated IBase IR Absint)
(preprocess (pps ppx_compare))
)
(preprocess
(pps ppx_compare)))

@ -8,7 +8,7 @@
(public_name infer.Labs)
(flags
(:standard -open Core -open IR -open IStdlib -open IStd -open ATDGenerated
-open IBase -open Absint))
-open IBase -open Absint))
(libraries core IStdlib ATDGenerated IBase IR Absint)
(preprocess (pps ppx_compare))
)
(preprocess
(pps ppx_compare)))

@ -10,7 +10,9 @@
(:standard -open Core -open IR -open IStdlib -open IStd -open ATDGenerated
-open IBase -open Absint -open Biabduction))
(libraries core IStdlib ATDGenerated IBase IR Absint Biabduction)
(preprocess (pps ppx_compare ppx_sexp_conv))
)
(preprocess
(pps ppx_compare ppx_sexp_conv)))
(documentation (package infer) (mld_files Nullsafe))
(documentation
(package infer)
(mld_files Nullsafe))

@ -10,5 +10,5 @@
(:standard -open Core -open IR -open IStdlib -open IStd -open ATDGenerated
-open IBase -open Nullsafe))
(libraries oUnit core IStdlib ATDGenerated IBase IR Nullsafe)
(preprocess (pps ppx_compare))
)
(preprocess
(pps ppx_compare)))

@ -10,5 +10,5 @@
(:standard -open Core -open IR -open IStdlib -open IStd -open ATDGenerated
-open IBase -open Absint -open BO))
(libraries core IStdlib ATDGenerated IBase IR Absint BO)
(preprocess (pps ppx_compare ppx_variants_conv))
)
(preprocess
(pps ppx_compare ppx_variants_conv)))

@ -10,5 +10,5 @@
(:standard -open Core -open IR -open IStdlib -open IStd -open ATDGenerated
-open IBase -open Absint))
(libraries core IStdlib ATDGenerated IBase IR Absint)
(preprocess (pps ppx_compare))
)
(preprocess
(pps ppx_compare)))

@ -7,11 +7,12 @@
(name TestDeterminators)
(public_name infer.TestDeterminators)
(flags
(:standard
-open Core -open IStdlib -open IStd -open OpenSource -open ATDGenerated
-open IBase -open IR -open CStubs))
(:standard -open Core -open IStdlib -open IStd -open OpenSource -open
ATDGenerated -open IBase -open IR -open CStubs))
(libraries core IStdlib ATDGenerated IBase IR CStubs)
(preprocess (pps ppx_compare))
)
(preprocess
(pps ppx_compare)))
(documentation (package infer) (mld_files TestDeterminators))
(documentation
(package infer)
(mld_files TestDeterminators))

@ -5,7 +5,9 @@
(ocamllex ToplLexer)
(menhir (flags --unused-token INDENT --explain) (modules ToplParser))
(menhir
(flags --unused-token INDENT --explain)
(modules ToplParser))
(library
(name TOPLlib)
@ -14,5 +16,5 @@
(:standard -open Core -open IR -open IStdlib -open IStd -open ATDGenerated
-open IBase -open Absint -open Biabduction -open Pulselib))
(libraries core IStdlib ATDGenerated IBase IR Absint Biabduction Pulselib)
(preprocess (pps ppx_compare ppx_hash ppx_sexp_conv))
)
(preprocess
(pps ppx_compare ppx_hash ppx_sexp_conv)))

Loading…
Cancel
Save