[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) (name IR)
(public_name infer.IR) (public_name infer.IR)
(flags (flags
(:standard -open Core -open IStdlib -open IStd -open ATDGenerated (:standard -open Core -open IStdlib -open IStd -open ATDGenerated -open
-open IBase)) IBase))
(libraries core zarith IStdlib ATDGenerated IBase) (libraries core zarith IStdlib ATDGenerated IBase)
(preprocess (preprocess
(pps ppx_compare))) (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) test: $(SRC_BUILD_COMMON) $(MAKEFILE_LIST)
$(QUIET)$(DUNE_BUILD) \ $(QUIET)$(DUNE_BUILD) \
$(patsubst %.exe, %.bc.exe, $(INFER_CONFIG_TARGETS)) \ $(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 .PHONY: doc
doc: $(SRC_BUILD_COMMON) $(MAKEFILE_LIST) doc: $(SRC_BUILD_COMMON) $(MAKEFILE_LIST)

@ -10,7 +10,9 @@
(:standard -open Core -open IR -open IStdlib -open IStd -open ATDGenerated (:standard -open Core -open IR -open IStdlib -open IStd -open ATDGenerated
-open IBase)) -open IBase))
(libraries core IStdlib ATDGenerated IBase IR) (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 (preprocess
(pps ppx_compare))) (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 ; Rules below are boilerplatey, but this is benign and very easy to
; understand boilerplate. ; understand boilerplate.
; ATD for jsonbug ; ATD for jsonbug
(rule (rule
(targets jsonbug_j.ml (targets jsonbug_j.ml jsonbug_j.mli)
jsonbug_j.mli)
(deps jsonbug.atd) (deps jsonbug.atd)
(action (run atdgen -j -j-std %{deps}))) (action
(run atdgen -j -j-std %{deps})))
(rule (rule
(targets jsonbug_t.ml (targets jsonbug_t.ml jsonbug_t.mli)
jsonbug_t.mli)
(deps jsonbug.atd) (deps jsonbug.atd)
(action (run atdgen -t %{deps}))) (action
(run atdgen -t %{deps})))
; ATD for runstate ; ATD for runstate
(rule (rule
(targets runstate_j.ml (targets runstate_j.ml runstate_j.mli)
runstate_j.mli)
(deps runstate.atd) (deps runstate.atd)
(action (run atdgen -j -j-std %{deps}))) (action
(run atdgen -j -j-std %{deps})))
(rule (rule
(targets runstate_t.ml (targets runstate_t.ml runstate_t.mli)
runstate_t.mli)
(deps runstate.atd) (deps runstate.atd)
(action (run atdgen -t %{deps}))) (action
(run atdgen -t %{deps})))
; ATD for java_method_decl ; ATD for java_method_decl
(rule (rule
(targets java_method_decl_j.ml (targets java_method_decl_j.ml java_method_decl_j.mli)
java_method_decl_j.mli)
(deps java_method_decl.atd) (deps java_method_decl.atd)
(action (run atdgen -j -j-std %{deps}))) (action
(run atdgen -j -j-std %{deps})))
(rule (rule
(targets java_method_decl_t.ml (targets java_method_decl_t.ml java_method_decl_t.mli)
java_method_decl_t.mli)
(deps java_method_decl.atd) (deps java_method_decl.atd)
(action (run atdgen -t %{deps}))) (action
(run atdgen -t %{deps})))
; ATD for java_profiler_samples ; ATD for java_profiler_samples
(rule (rule
(targets java_profiler_samples_j.ml (targets java_profiler_samples_j.ml java_profiler_samples_j.mli)
java_profiler_samples_j.mli)
(deps java_profiler_samples.atd) (deps java_profiler_samples.atd)
(action (run atdgen -j -j-std %{deps}))) (action
(run atdgen -j -j-std %{deps})))
(rule (rule
(targets java_profiler_samples_t.ml (targets java_profiler_samples_t.ml java_profiler_samples_t.mli)
java_profiler_samples_t.mli)
(deps java_profiler_samples.atd) (deps java_profiler_samples.atd)
(action (run atdgen -t %{deps}))) (action
(run atdgen -t %{deps})))
; ATD for clang_profiler_samples ; ATD for clang_profiler_samples
(rule (rule
(targets clang_profiler_samples_j.ml (targets clang_profiler_samples_j.ml clang_profiler_samples_j.mli)
clang_profiler_samples_j.mli)
(deps clang_profiler_samples.atd) (deps clang_profiler_samples.atd)
(action (run atdgen -j -j-std %{deps}))) (action
(run atdgen -j -j-std %{deps})))
(rule (rule
(targets clang_profiler_samples_t.ml (targets clang_profiler_samples_t.ml clang_profiler_samples_t.mli)
clang_profiler_samples_t.mli)
(deps clang_profiler_samples.atd) (deps clang_profiler_samples.atd)
(action (run atdgen -t %{deps}))) (action
(run atdgen -t %{deps})))

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

@ -6,14 +6,17 @@
(library (library
(name IBase) (name IBase)
(public_name infer.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 (libraries cmdliner core mtime.clock.os parmap re sqlite3 zip ATDGenerated
IStdlib OpenSource) IStdlib OpenSource)
(preprocess (preprocess
(pps ppx_blob ppx_compare ppx_enumerate)) (pps ppx_blob ppx_compare ppx_enumerate))
(preprocessor_deps (preprocessor_deps
(glob_files ../../documentation/checkers/*.md) (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 (: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) (libraries core IStdlib ATDGenerated IBase IR Absint)
(preprocess (pps ppx_compare)) (preprocess
) (pps ppx_compare)))

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

@ -7,10 +7,14 @@
(name Checkers) (name Checkers)
(public_name infer.Checkers) (public_name infer.Checkers)
(flags (flags
(:standard -open Core -open OpenSource -open IR -open IStdlib -open IStd -open ATDGenerated (:standard -open Core -open OpenSource -open IR -open IStdlib -open IStd
-open IBase -open Absint -open Biabduction -open BO -open Pulselib)) -open ATDGenerated -open IBase -open Absint -open Biabduction -open BO
(libraries base64 core ocamlgraph IStdlib ATDGenerated IBase IR Absint Biabduction BO Pulselib) -open Pulselib))
(preprocess (pps ppx_compare)) (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 (flags
(:standard -open Core -open IR -open IStdlib -open IStd -open ATDGenerated (:standard -open Core -open IR -open IStdlib -open IStd -open ATDGenerated
-open IBase -open ClangFrontend -open ASTLanguage)) -open IBase -open ClangFrontend -open ASTLanguage))
(libraries oUnit core IStdlib ATDGenerated IBase IR ClangFrontend ASTLanguage) (libraries oUnit core IStdlib ATDGenerated IBase IR ClangFrontend
(preprocess (pps ppx_compare)) ASTLanguage)
) (preprocess
(pps ppx_compare)))

@ -10,5 +10,5 @@
(:standard -open Core -open OpenSource -open IR -open IStdlib -open IStd (:standard -open Core -open OpenSource -open IR -open IStdlib -open IStd
-open ATDGenerated -open IBase -open Absint)) -open ATDGenerated -open IBase -open Absint))
(libraries base64 core IStdlib ATDGenerated IBase IR 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 (:standard -open Core -open OpenSource -open IR -open IStdlib -open IStd
-open ATDGenerated -open IBase -open Absint -open BO -open Checkers)) -open ATDGenerated -open IBase -open Absint -open BO -open Checkers))
(libraries core IStdlib ATDGenerated IBase IR Absint BO Checkers) (libraries core IStdlib ATDGenerated IBase IR Absint BO Checkers)
(preprocess (pps ppx_compare)) (preprocess
) (pps ppx_compare)))

@ -6,10 +6,12 @@
(executable (executable
(name all_infer_in_one_file) (name all_infer_in_one_file)
(modes byte) (modes byte)
(flags (:standard -w +60)) (flags
(:standard -w +60))
(libraries javalib ANSITerminal async atdgen base base64 cmdliner core (libraries javalib ANSITerminal async atdgen base base64 cmdliner core
mtime.clock.os ocamlgraph oUnit parmap re sawja sqlite3 str unix xmlm mtime.clock.os ocamlgraph oUnit parmap re sawja sqlite3 str unix xmlm
yojson zarith zip CStubs) yojson zarith zip CStubs)
(modules All_infer_in_one_file) (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 (preprocess
(pps ppx_compare))) (pps ppx_compare)))
(documentation (package infer) (mld_files IStdlib)) (documentation
(package infer)
(mld_files IStdlib))

@ -9,5 +9,5 @@
(:standard -open Core -open IR -open IStdlib -open IStd -open ATDGenerated (: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) (libraries core IStdlib ATDGenerated IBase IR Absint)
(preprocess (pps ppx_compare)) (preprocess
) (pps ppx_compare)))

@ -9,5 +9,5 @@
(:standard -open Core -open IR -open IStdlib -open IStd -open ATDGenerated (: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) (libraries core IStdlib ATDGenerated IBase IR Absint)
(preprocess (pps ppx_compare)) (preprocess
) (pps ppx_compare)))

@ -9,5 +9,5 @@
(:standard -open Core -open IR -open IStdlib -open IStd -open ATDGenerated (: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) (libraries core IStdlib ATDGenerated IBase IR Absint)
(preprocess (pps ppx_compare)) (preprocess
) (pps ppx_compare)))

@ -9,5 +9,5 @@
(:standard -open Core -open IR -open IStdlib -open IStd -open ATDGenerated (: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) (libraries core IStdlib ATDGenerated IBase IR Absint)
(preprocess (pps ppx_compare)) (preprocess
) (pps ppx_compare)))

@ -9,5 +9,5 @@
(:standard -open Core -open IR -open IStdlib -open IStd -open ATDGenerated (: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) (libraries core IStdlib ATDGenerated IBase IR Absint)
(preprocess (pps ppx_compare)) (preprocess
) (pps ppx_compare)))

@ -9,5 +9,5 @@
(:standard -open Core -open IR -open IStdlib -open IStd -open ATDGenerated (: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) (libraries core IStdlib ATDGenerated IBase IR Absint)
(preprocess (pps ppx_compare)) (preprocess
) (pps ppx_compare)))

@ -10,5 +10,5 @@
(:standard -open Core -open IR -open IStdlib -open IStd -open ATDGenerated (: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) (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 (:standard -open Core -open IR -open IStdlib -open IStd -open ATDGenerated
-open IBase -open Absint -open Biabduction)) -open IBase -open Absint -open Biabduction))
(libraries core IStdlib ATDGenerated IBase IR Absint 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 (:standard -open Core -open IR -open IStdlib -open IStd -open ATDGenerated
-open IBase -open Nullsafe)) -open IBase -open Nullsafe))
(libraries oUnit core IStdlib ATDGenerated IBase IR 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 (:standard -open Core -open IR -open IStdlib -open IStd -open ATDGenerated
-open IBase -open Absint -open BO)) -open IBase -open Absint -open BO))
(libraries core IStdlib ATDGenerated IBase IR Absint 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 (: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) (libraries core IStdlib ATDGenerated IBase IR Absint)
(preprocess (pps ppx_compare)) (preprocess
) (pps ppx_compare)))

@ -7,11 +7,12 @@
(name TestDeterminators) (name TestDeterminators)
(public_name infer.TestDeterminators) (public_name infer.TestDeterminators)
(flags (flags
(:standard (:standard -open Core -open IStdlib -open IStd -open OpenSource -open
-open Core -open IStdlib -open IStd -open OpenSource -open ATDGenerated ATDGenerated -open IBase -open IR -open CStubs))
-open IBase -open IR -open CStubs))
(libraries core IStdlib ATDGenerated IBase IR 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) (ocamllex ToplLexer)
(menhir (flags --unused-token INDENT --explain) (modules ToplParser)) (menhir
(flags --unused-token INDENT --explain)
(modules ToplParser))
(library (library
(name TOPLlib) (name TOPLlib)
@ -14,5 +16,5 @@
(:standard -open Core -open IR -open IStdlib -open IStd -open ATDGenerated (:standard -open Core -open IR -open IStdlib -open IStd -open ATDGenerated
-open IBase -open Absint -open Biabduction -open Pulselib)) -open IBase -open Absint -open Biabduction -open Pulselib))
(libraries core IStdlib ATDGenerated IBase IR Absint Biabduction 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