From b95f29c8d1bca8829bd561fe0c9f37f5a50ef0bc Mon Sep 17 00:00:00 2001
From: Jules Villard <jul@fb.com>
Date: Fri, 13 Oct 2017 02:58:48 -0700
Subject: [PATCH] various minor improvements

Summary:
1. Mark some Makefile targets as depending on `MAKEFILE_LIST` so they get rebuilt on Makefile changes
2. Do not show boolean options with no documentation in the man pages (like we do for other option types).
3. Default to Lazy dynamic dispatch for the checkers.
4. In the tests, use `--<checker>-only` instead of relying on `--no-default-checkers`
5. `--no-filtering` is redundant if `--debug-exceptions` is passed

Reviewed By: jeremydubreil

Differential Revision: D6030578

fbshipit-source-id: 3320f0a
---
 infer/models/c/Makefile                       |  2 +-
 infer/models/cpp/Makefile                     |  2 +-
 infer/models/java/Makefile                    |  2 +-
 infer/models/objc/Makefile                    |  2 +-
 infer/src/backend/InferAnalyze.ml             | 11 ++++---
 infer/src/backend/callbacks.ml                |  2 +-
 infer/src/backend/interproc.ml                |  6 ++--
 infer/src/backend/preanal.ml                  | 12 ++++---
 infer/src/backend/specs.ml                    |  4 ++-
 infer/src/backend/symExec.ml                  |  6 ++--
 infer/src/base/CommandLineOption.ml           |  9 +++---
 infer/src/base/Config.ml                      | 31 ++++++++++++-------
 infer/src/base/Config.mli                     |  8 ++++-
 infer/tests/clang.make                        |  2 +-
 .../codetoanalyze/c/biabduction/Makefile      |  2 +-
 .../codetoanalyze/cpp/bufferoverrun/Makefile  |  4 +--
 .../tests/codetoanalyze/cpp/liveness/Makefile |  2 +-
 .../codetoanalyze/cpp/nullable/issues.exp     |  1 +
 .../tests/codetoanalyze/cpp/quandary/Makefile |  5 ++-
 infer/tests/codetoanalyze/cpp/siof/Makefile   |  2 +-
 .../codetoanalyze/java/checkers/Makefile      |  6 +++-
 .../tests/codetoanalyze/java/harness/Makefile |  2 +-
 infer/tests/codetoanalyze/java/infer/Makefile |  2 ++
 .../codetoanalyze/java/quandary/Makefile      |  2 +-
 .../codetoanalyze/java/threadsafety/Makefile  |  2 +-
 .../tests/codetoanalyze/java/tracing/Makefile |  2 +-
 .../codetoanalyze/objc/checkers/Nullable.m    |  2 +-
 .../codetoanalyze/objc/checkers/issues.exp    |  3 +-
 infer/tests/javac.make                        |  2 +-
 29 files changed, 86 insertions(+), 52 deletions(-)

diff --git a/infer/models/c/Makefile b/infer/models/c/Makefile
index 80fbf3a67..a4fcf0ee9 100644
--- a/infer/models/c/Makefile
+++ b/infer/models/c/Makefile
@@ -13,7 +13,7 @@ INFER_RESULTS = out/report.json
 
 all: install
 
-$(INFER_RESULTS): $(C_MODELS_SOURCES) $(CLANG_DEPS_NO_MODELS)
+$(INFER_RESULTS): $(C_MODELS_SOURCES) $(CLANG_DEPS_NO_MODELS) $(MAKEFILE_LIST)
 #	make clean in src/ to recompile all the models
 	$(QUIET)$(call silent_on_success,Building C models,\
 	  $(INFER_BIN) -o $(@D) --models-mode -- $(MAKE) -C src clean all)
diff --git a/infer/models/cpp/Makefile b/infer/models/cpp/Makefile
index 896e79045..c0556f08e 100644
--- a/infer/models/cpp/Makefile
+++ b/infer/models/cpp/Makefile
@@ -15,7 +15,7 @@ INFER_RESULTS = out/report.json
 
 all: install
 
-$(INFER_RESULTS): $(MODELS_SOURCES) $(CLANG_DEPS_NO_MODELS)
+$(INFER_RESULTS): $(MODELS_SOURCES) $(CLANG_DEPS_NO_MODELS) $(MAKEFILE_LIST)
 #	make clean in src/ to recompile all the models
 	$(QUIET)$(call silent_on_success,Building C++ models,\
 	  $(INFER_BIN) -o $(@D) --models-mode -- $(MAKE) -C src clean all)
diff --git a/infer/models/java/Makefile b/infer/models/java/Makefile
index 05d82e65b..5d5b61395 100644
--- a/infer/models/java/Makefile
+++ b/infer/models/java/Makefile
@@ -27,7 +27,7 @@ clean:
 compile:
 	$(JAVAC) -bootclasspath $(ANDROID_JAR) -d $(MODELS_OUT) -classpath $(MODELS_CLASSPATH) $(JAVA_SOURCES)
 
-$(INFER_REPORT): $(JAVA_DEPS_NO_MODELS) $(JAVA_SOURCES)
+$(INFER_REPORT): $(JAVA_DEPS_NO_MODELS) $(JAVA_SOURCES) $(MAKEFILE_LIST)
 	$(QUIET)rm -fr $(MODELS_OUT)
 	$(QUIET)$(MKDIR_P) $(MODELS_OUT)
 	$(QUIET)rm -f $(JAVA_MODELS_JAR)
diff --git a/infer/models/objc/Makefile b/infer/models/objc/Makefile
index 7a82641e1..83b61c09e 100644
--- a/infer/models/objc/Makefile
+++ b/infer/models/objc/Makefile
@@ -13,7 +13,7 @@ INFER_RESULTS = out/report.json
 
 all: install
 
-$(INFER_RESULTS): $(OBJC_MODELS_SOURCES) $(CLANG_DEPS_NO_MODELS)
+$(INFER_RESULTS): $(OBJC_MODELS_SOURCES) $(CLANG_DEPS_NO_MODELS) $(MAKEFILE_LIST)
 # make clean in src/ to recompile all the models
 	$(QUIET)$(call silent_on_success,Building Objective-C models,\
 	  $(INFER_BIN) -o $(@D) --models-mode -- $(MAKE) -C src clean all)
diff --git a/infer/src/backend/InferAnalyze.ml b/infer/src/backend/InferAnalyze.ml
index b871e4f02..d87f6dad8 100644
--- a/infer/src/backend/InferAnalyze.ml
+++ b/infer/src/backend/InferAnalyze.ml
@@ -63,7 +63,8 @@ let output_json_makefile_stats clusters =
 let process_cluster_cmdline fname =
   match Cluster.load_from_file (DB.filename_from_string fname) with
   | None
-   -> L.internal_error "Cannot find cluster file %s@." fname
+   -> (if Config.keep_going then L.internal_error else L.die InternalError)
+        "Cannot find cluster file %s@." fname
   | Some (nr, cluster)
    -> analyze_cluster (nr - 1) cluster
 
@@ -100,7 +101,7 @@ let cluster_should_be_analyzed ~changed_files cluster =
   in
   let check_modified () =
     let modified = DB.file_was_updated_after_start (DB.filename_from_string fname) in
-    if modified && Config.developer_mode then L.progress "Modified: %s@." fname ;
+    if modified && Config.developer_mode then L.debug Analysis Medium "Modified: %s@." fname ;
     modified
   in
   match is_changed_file with
@@ -140,8 +141,10 @@ let main ~changed_files ~makefile =
           ~f:(fun cl -> DB.string_crc_has_extension ~ext:"java" (DB.source_dir_to_string cl))
           all_clusters
       in
-      if Config.print_active_checkers then
-        L.result "Active checkers: %a@." RegisterCheckers.pp_active_checkers () ;
+      (if Config.print_active_checkers then L.result else L.debug Analysis Quiet)
+        "Active checkers: %a@\n" RegisterCheckers.pp_active_checkers () ;
+      L.debug Analysis Quiet "Dynamic dispatch mode: %s@."
+        Config.(string_of_dynamic_dispatch dynamic_dispatch) ;
       print_legend () ;
       if Config.per_procedure_parallelism && not (is_java ()) then (
         (* Java uses ZipLib which is incompatible with forking *)
diff --git a/infer/src/backend/callbacks.ml b/infer/src/backend/callbacks.ml
index c1cc51874..9c8987651 100644
--- a/infer/src/backend/callbacks.ml
+++ b/infer/src/backend/callbacks.ml
@@ -91,7 +91,7 @@ let iterate_callbacks call_graph exe_env =
     match Exe_env.get_proc_desc exe_env proc_name with
     | Some pdesc
      -> Some pdesc
-    | None when Config.dynamic_dispatch = `Lazy
+    | None when Config.(equal_dynamic_dispatch dynamic_dispatch Lazy)
      -> Option.bind (Specs.get_summary proc_name) ~f:(fun summary -> summary.Specs.proc_desc_option)
     | None
      -> None
diff --git a/infer/src/backend/interproc.ml b/infer/src/backend/interproc.ml
index 1f28efb10..db41521a7 100644
--- a/infer/src/backend/interproc.ml
+++ b/infer/src/backend/interproc.ml
@@ -1342,7 +1342,9 @@ let do_analysis_closures exe_env : Tasks.closure list =
     let attributes =
       {(Procdesc.get_attributes pdesc) with ProcAttributes.err_log= static_err_log}
     in
-    let proc_desc_option = if Config.dynamic_dispatch = `Lazy then Some pdesc else None in
+    let proc_desc_option =
+      if Config.(equal_dynamic_dispatch dynamic_dispatch Lazy) then Some pdesc else None
+    in
     ignore (Specs.init_summary (nodes, proc_flags, calls, attributes, proc_desc_option))
   in
   let callbacks =
@@ -1350,7 +1352,7 @@ let do_analysis_closures exe_env : Tasks.closure list =
       match Exe_env.get_proc_desc exe_env proc_name with
       | Some pdesc
        -> Some pdesc
-      | None when Config.dynamic_dispatch = `Lazy
+      | None when Config.(equal_dynamic_dispatch dynamic_dispatch Lazy)
        -> Option.bind (Specs.get_summary proc_name) ~f:(fun summary ->
               summary.Specs.proc_desc_option )
       | None
diff --git a/infer/src/backend/preanal.ml b/infer/src/backend/preanal.ml
index 561e5032f..66884deb0 100644
--- a/infer/src/backend/preanal.ml
+++ b/infer/src/backend/preanal.ml
@@ -14,7 +14,7 @@ module L = Logging
 
 (** mutate the cfg/cg to add dynamic dispatch handling *)
 let add_dispatch_calls pdesc cg tenv =
-  let sound_dynamic_dispatch = Config.dynamic_dispatch = `Sound in
+  let sound_dynamic_dispatch = Config.(equal_dynamic_dispatch dynamic_dispatch Sound) in
   let node_add_dispatch_calls caller_pname node =
     let call_flags_is_dispatch call_flags =
       (* if sound dispatch is turned off, only consider dispatch for interface calls *)
@@ -244,8 +244,10 @@ let do_abstraction pdesc =
   add_abstraction_instructions pdesc ; Procdesc.signal_did_preanalysis pdesc
 
 let do_dynamic_dispatch pdesc cg tenv =
-  let pname = Procdesc.get_proc_name pdesc in
-  if Typ.Procname.is_java pname
-     && (Config.dynamic_dispatch = `Interface || Config.dynamic_dispatch = `Sound)
-  then add_dispatch_calls pdesc cg tenv ;
+  ( match Config.dynamic_dispatch with
+  | Interface | Sound
+   -> let pname = Procdesc.get_proc_name pdesc in
+      if Typ.Procname.is_java pname then add_dispatch_calls pdesc cg tenv
+  | NoDynamicDispatch | Lazy
+   -> () ) ;
   Procdesc.signal_did_preanalysis pdesc
diff --git a/infer/src/backend/specs.ml b/infer/src/backend/specs.ml
index 3f5aefd91..e77cc1104 100644
--- a/infer/src/backend/specs.ml
+++ b/infer/src/backend/specs.ml
@@ -721,7 +721,9 @@ let dummy =
 
 (** Reset a summary rebuilding the dependents and preserving the proc attributes if present. *)
 let reset_summary proc_desc =
-  let proc_desc_option = if Config.dynamic_dispatch = `Lazy then Some proc_desc else None in
+  let proc_desc_option =
+    if Config.(equal_dynamic_dispatch dynamic_dispatch Lazy) then Some proc_desc else None
+  in
   let attributes = Procdesc.get_attributes proc_desc in
   let proc_flags = attributes.ProcAttributes.proc_flags in
   init_summary ([], proc_flags, [], attributes, proc_desc_option)
diff --git a/infer/src/backend/symExec.ml b/infer/src/backend/symExec.ml
index e208c1bc6..9e13aa03e 100644
--- a/infer/src/backend/symExec.ml
+++ b/infer/src/backend/symExec.ml
@@ -579,7 +579,7 @@ let resolve_typename prop receiver_exp =
   in
   match typexp_opt with Some Exp.Sizeof {typ= {desc= Tstruct name}} -> Some name | _ -> None
 
-(** If the dynamic type of the receiver actual T_actual is a subtype of the reciever type T_formal
+(** If the dynamic type of the receiver actual T_actual is a subtype of the receiver type T_formal
     in the signature of [pname], resolve [pname] to T_actual.[pname]. *)
 let resolve_virtual_pname tenv prop actuals callee_pname call_flags : Typ.Procname.t list =
   let resolve receiver_exp pname prop =
@@ -621,7 +621,7 @@ let resolve_virtual_pname tenv prop actuals callee_pname call_flags : Typ.Procna
       if !Config.curr_language <> Config.Java then
         (* default mode for Obj-C/C++/Java virtual calls: resolution only *)
         [do_resolve callee_pname receiver_exp actual_receiver_typ]
-      else if Config.dynamic_dispatch = `Sound then
+      else if Config.(equal_dynamic_dispatch dynamic_dispatch Sound) then
         let targets =
           if call_flags.CallFlags.cf_virtual then
             (* virtual call--either [called_pname] or an override in some subtype may be called *)
@@ -1182,7 +1182,7 @@ let rec sym_exec tenv current_pdesc _instr (prop_: Prop.normal Prop.t) path
      -> exec_builtin (call_args prop_ callee_pname actual_params ret_id loc)
     | None ->
       match callee_pname with
-      | Java callee_pname_java when Config.dynamic_dispatch = `Lazy
+      | Java callee_pname_java when Config.(equal_dynamic_dispatch dynamic_dispatch Lazy)
        -> (
           let norm_prop, norm_args' = normalize_params tenv current_pname prop_ actual_params in
           let norm_args = call_constructor_url_update_args callee_pname norm_args' in
diff --git a/infer/src/base/CommandLineOption.ml b/infer/src/base/CommandLineOption.ml
index ac0494768..fab8c55c8 100644
--- a/infer/src/base/CommandLineOption.ml
+++ b/infer/src/base/CommandLineOption.ml
@@ -394,7 +394,7 @@ let mk_option ?(default= None) ?(default_to_string= fun _ -> "") ~f ?(mk_reset=
   else mk ()
 
 let mk_bool ?(deprecated_no= []) ?(default= false) ?(f= fun b -> b) ?(deprecated= []) ~long ?short
-    ?parse_mode ?in_help ?(meta= "") doc =
+    ?parse_mode ?in_help ?(meta= "") doc0 =
   let nolong =
     let len = String.length long in
     if len > 3 && String.sub long ~pos:0 ~len:3 = "no-" then String.sub long ~pos:3 ~len:(len - 3)
@@ -408,12 +408,13 @@ let mk_bool ?(deprecated_no= []) ?(default= false) ?(f= fun b -> b) ?(deprecated
   let doc long short =
     match short with
     | Some short
-     -> doc ^ " (Conversely: $(b,--" ^ long ^ ") | $(b,-" ^ String.of_char short ^ "))"
+     -> doc0 ^ " (Conversely: $(b,--" ^ long ^ ") | $(b,-" ^ String.of_char short ^ "))"
     | None
-     -> doc ^ " (Conversely: $(b,--" ^ long ^ "))"
+     -> doc0 ^ " (Conversely: $(b,--" ^ long ^ "))"
   in
   let doc, nodoc =
-    if not default then ("Activates: " ^ doc nolong noshort, "")
+    if String.equal doc0 "" then ("", "")
+    else if not default then ("Activates: " ^ doc nolong noshort, "")
     else ("", "Deactivates: " ^ doc long short)
   in
   let default_to_string _ = "" in
diff --git a/infer/src/base/Config.ml b/infer/src/base/Config.ml
index 7c8534ab2..166a126ab 100644
--- a/infer/src/base/Config.ml
+++ b/infer/src/base/Config.ml
@@ -47,7 +47,7 @@ type language = Clang | Java | Python [@@deriving compare]
 
 let equal_language = [%compare.equal : language]
 
-let string_of_language = function Java -> "Java" | Clang -> "C_CPP" | Python -> "python"
+let string_of_language = function Java -> "Java" | Clang -> "C/C++/ObjC" | Python -> "python"
 
 let ml_bucket_symbols =
   [ ("all", `MLeak_all)
@@ -332,7 +332,16 @@ let whitelisted_cpp_classes =
     ; libcxx_whitelisted_cpp_classes
     ; other_whitelisted_cpp_classes ]
 
-(** Compile time configuration values *)
+type dynamic_dispatch = NoDynamicDispatch | Interface | Sound | Lazy [@@deriving compare]
+
+let equal_dynamic_dispatch = [%compare.equal : dynamic_dispatch]
+
+let string_to_dynamic_dispatch =
+  [("none", NoDynamicDispatch); ("interface", Interface); ("sound", Sound); ("lazy", Lazy)]
+
+let string_of_dynamic_dispatch ddp =
+  List.find_exn ~f:(fun (_, ddp') -> equal_dynamic_dispatch ddp ddp') string_to_dynamic_dispatch
+  |> fst
 
 let pp_version fmt () =
   F.fprintf fmt "Infer version %s@\nCopyright 2009 - present Facebook. All Rights Reserved."
@@ -1037,7 +1046,7 @@ and dump_duplicate_symbols =
 and dynamic_dispatch =
   CLOpt.mk_symbol_opt ~long:"dynamic-dispatch"
     "Specify treatment of dynamic dispatch in Java code: 'none' treats dynamic dispatch as a call to unknown code, 'lazy' follows the JVM semantics and creates procedure descriptions during symbolic execution using the type information found in the abstract state; 'sound' is significantly more computationally expensive"
-    ~symbols:[("none", `None); ("interface", `Interface); ("sound", `Sound); ("lazy", `Lazy)]
+    ~symbols:string_to_dynamic_dispatch
 
 and eradicate_condition_redundant =
   CLOpt.mk_bool ~long:"eradicate-condition-redundant" "Condition redundant warnings"
@@ -2370,9 +2379,7 @@ let clang_frontend_do_capture, clang_frontend_do_lint =
     | Some BiAbduction | Some Checkers
      -> (true, false) (* capture, no lint *)
     | _
-     -> (true, true)
-
-(* capture, lint *)
+     -> (* capture, lint *) (true, true)
 
 let analyzer = match !analyzer with Some a -> a | None -> BiAbduction
 
@@ -2385,16 +2392,16 @@ let dynamic_dispatch =
   let default_mode =
     match analyzer with
     | BiAbduction
-     -> `Lazy
+     -> Lazy
     | Checkers when biabduction
      -> if quandary then
-          F.printf
-            "WARNING: Running Quanday on Java is not compatible with the Biabduction analysis@." ;
-        `Lazy
+          F.eprintf
+            "WARNING: Running Quandary on Java is not compatible with the Biabduction analysis@." ;
+        Lazy
     | Checkers when quandary
-     -> `Sound
+     -> Sound
     | _
-     -> `None
+     -> NoDynamicDispatch
   in
   Option.value ~default:default_mode !dynamic_dispatch
 
diff --git a/infer/src/base/Config.mli b/infer/src/base/Config.mli
index abd0ed76f..4689384eb 100644
--- a/infer/src/base/Config.mli
+++ b/infer/src/base/Config.mli
@@ -71,6 +71,12 @@ type compilation_database_dependencies =
   | NoDeps
   [@@deriving compare]
 
+type dynamic_dispatch = NoDynamicDispatch | Interface | Sound | Lazy [@@deriving compare]
+
+val equal_dynamic_dispatch : dynamic_dispatch -> dynamic_dispatch -> bool
+
+val string_of_dynamic_dispatch : dynamic_dispatch -> string
+
 val env_inside_maven : Unix.env
 
 (** Constant configuration values *)
@@ -360,7 +366,7 @@ val dotty_cfg_libs : bool
 
 val dump_duplicate_symbols : bool
 
-val dynamic_dispatch : [`None | `Interface | `Sound | `Lazy]
+val dynamic_dispatch : dynamic_dispatch
 
 val eradicate : bool
 
diff --git a/infer/tests/clang.make b/infer/tests/clang.make
index 6c4d7fd4c..29f2f886b 100644
--- a/infer/tests/clang.make
+++ b/infer/tests/clang.make
@@ -16,7 +16,7 @@ include $(TESTS_DIR)/clang-base.make
 
 infer-out$(TEST_SUFFIX)/report.json: $(CLANG_DEPS) $(SOURCES) $(HEADERS) $(TESTS_DIR)/.inferconfig $(MAKEFILE_LIST)
 	$(QUIET)$(call silent_on_success,Testing infer/clang$(ANALYZER_STRING) in $(TEST_REL_DIR),\
-	  $(INFER_BIN) --results-dir $(@D) --dump-duplicate-symbols --no-default-checkers \
+	  $(INFER_BIN) --results-dir $(@D) --dump-duplicate-symbols \
 	    $(INFER_OPTIONS) -a $(ANALYZER) -- \
 	    clang $(CLANG_OPTIONS) $(SOURCES))
 	$(QUIET)$(call check_no_duplicates,infer-out$(TEST_SUFFIX)/duplicates.txt)
diff --git a/infer/tests/codetoanalyze/c/biabduction/Makefile b/infer/tests/codetoanalyze/c/biabduction/Makefile
index 3207826df..80abe2db8 100644
--- a/infer/tests/codetoanalyze/c/biabduction/Makefile
+++ b/infer/tests/codetoanalyze/c/biabduction/Makefile
@@ -9,7 +9,7 @@ TESTS_DIR = ../../..
 
 ANALYZER = checkers
 CLANG_OPTIONS = -c
-INFER_OPTIONS = --biabduction --debug-exceptions --project-root $(TESTS_DIR)
+INFER_OPTIONS = --biabduction-only --debug-exceptions --project-root $(TESTS_DIR)
 
 INFERPRINT_OPTIONS = --issues-tests
 
diff --git a/infer/tests/codetoanalyze/cpp/bufferoverrun/Makefile b/infer/tests/codetoanalyze/cpp/bufferoverrun/Makefile
index e8445f5f5..b34f072bc 100644
--- a/infer/tests/codetoanalyze/cpp/bufferoverrun/Makefile
+++ b/infer/tests/codetoanalyze/cpp/bufferoverrun/Makefile
@@ -10,8 +10,8 @@ TESTS_DIR = ../../..
 ANALYZER = checkers
 # see explanations in cpp/errors/Makefile for the custom isystem
 CLANG_OPTIONS = -x c++ -std=c++11 -nostdinc++ -isystem$(MODELS_DIR)/cpp/include -isystem$(CLANG_INCLUDES)/c++/v1/ -c
-INFER_OPTIONS = --bufferoverrun --ml-buckets cpp --no-filtering --debug-exceptions \
-                --project-root $(TESTS_DIR) --no-liveness
+INFER_OPTIONS = --bufferoverrun-only --ml-buckets cpp --no-filtering --debug-exceptions \
+                --project-root $(TESTS_DIR)
 INFERPRINT_OPTIONS = --issues-tests
 
 SOURCES = $(wildcard *.cpp)
diff --git a/infer/tests/codetoanalyze/cpp/liveness/Makefile b/infer/tests/codetoanalyze/cpp/liveness/Makefile
index bd7b732f3..42a57624a 100644
--- a/infer/tests/codetoanalyze/cpp/liveness/Makefile
+++ b/infer/tests/codetoanalyze/cpp/liveness/Makefile
@@ -10,7 +10,7 @@ TESTS_DIR = ../../..
 ANALYZER = checkers
 # see explanations in cpp/errors/Makefile for the custom isystem
 CLANG_OPTIONS = -x c++ -std=c++14 -nostdinc++ -isystem$(MODELS_DIR)/cpp/include -isystem$(CLANG_INCLUDES)/c++/v1/ -c
-INFER_OPTIONS = --liveness --ml-buckets cpp --debug-exceptions --project-root $(TESTS_DIR)
+INFER_OPTIONS = --liveness-only --ml-buckets cpp --debug-exceptions --project-root $(TESTS_DIR)
 INFERPRINT_OPTIONS = --issues-tests
 
 SOURCES = $(wildcard *.cpp)
diff --git a/infer/tests/codetoanalyze/cpp/nullable/issues.exp b/infer/tests/codetoanalyze/cpp/nullable/issues.exp
index a31dc2f58..33ac5aa43 100644
--- a/infer/tests/codetoanalyze/cpp/nullable/issues.exp
+++ b/infer/tests/codetoanalyze/cpp/nullable/issues.exp
@@ -7,6 +7,7 @@ codetoanalyze/cpp/nullable/example.cpp, T_dereference_unnanotated_field_after_te
 codetoanalyze/cpp/nullable/example.cpp, T_dereference_unnanotated_field_after_test_for_null_bad, 2, NULL_DEREFERENCE, [start of procedure dereference_unnanotated_field_after_test_for_null_bad,Condition is true]
 codetoanalyze/cpp/nullable/example.cpp, T_test_nonnull_field_for_null_bad, 1, FIELD_SHOULD_BE_NULLABLE, [Field nonnull_field is compared to null here]
 codetoanalyze/cpp/nullable/example.cpp, T_test_unnanotated_field_for_null_bad, 1, FIELD_SHOULD_BE_NULLABLE, [Field unnanotated_field is compared to null here]
+codetoanalyze/cpp/nullable/method.cpp, FP_reAssigningNullableValueOk, 1, DEAD_STORE, [Write of unused value]
 codetoanalyze/cpp/nullable/method.cpp, FP_reAssigningNullableValueOk, 2, NULLABLE_DEREFERENCE, [deference of &p,assignment of the nullable value,definition of mayReturnNullPointer]
 codetoanalyze/cpp/nullable/method.cpp, assignNullableValueBad, 2, NULLABLE_DEREFERENCE, [deference of &p,assignment of the nullable value,definition of mayReturnNullPointer]
 codetoanalyze/cpp/nullable/method.cpp, assignNullableValueBad, 2, NULL_DEREFERENCE, [start of procedure assignNullableValueBad(),start of procedure mayReturnNullPointer,Condition is true,return from a call to T_mayReturnNullPointer]
diff --git a/infer/tests/codetoanalyze/cpp/quandary/Makefile b/infer/tests/codetoanalyze/cpp/quandary/Makefile
index df20579de..1ca9fbca9 100644
--- a/infer/tests/codetoanalyze/cpp/quandary/Makefile
+++ b/infer/tests/codetoanalyze/cpp/quandary/Makefile
@@ -10,7 +10,10 @@ TESTS_DIR = ../../..
 ANALYZER = checkers
 # see explanations in cpp/errors/Makefile for the custom isystem
 CLANG_OPTIONS = -x c++ -std=c++11 -nostdinc++ -isystem$(ROOT_DIR) -isystem$(CLANG_INCLUDES)/c++/v1/ -c
-INFER_OPTIONS = --quandary --passthroughs --ml-buckets cpp --no-filtering --debug-exceptions --project-root $(TESTS_DIR)
+INFER_OPTIONS = \
+  --quandary-only --passthroughs --debug-exceptions \
+  --project-root $(TESTS_DIR) \
+
 INFERPRINT_OPTIONS = --issues-tests
 
 SOURCES = $(wildcard *.cpp)
diff --git a/infer/tests/codetoanalyze/cpp/siof/Makefile b/infer/tests/codetoanalyze/cpp/siof/Makefile
index 5e3c4464a..c712460f3 100644
--- a/infer/tests/codetoanalyze/cpp/siof/Makefile
+++ b/infer/tests/codetoanalyze/cpp/siof/Makefile
@@ -10,7 +10,7 @@ TESTS_DIR = ../../..
 ANALYZER = checkers
 # see explanations in cpp/errors/Makefile for the custom isystem
 CLANG_OPTIONS = -x c++ -std=c++11 -nostdinc++ -isystem$(MODELS_DIR)/cpp/include -isystem$(CLANG_INCLUDES)/c++/v1/ -c
-INFER_OPTIONS = --siof --ml-buckets cpp --no-filtering --debug-exceptions --project-root $(TESTS_DIR)
+INFER_OPTIONS = --siof-only --debug-exceptions --project-root $(TESTS_DIR)
 INFERPRINT_OPTIONS = --issues-tests
 
 SOURCES = \
diff --git a/infer/tests/codetoanalyze/java/checkers/Makefile b/infer/tests/codetoanalyze/java/checkers/Makefile
index b2270782a..465f794ae 100644
--- a/infer/tests/codetoanalyze/java/checkers/Makefile
+++ b/infer/tests/codetoanalyze/java/checkers/Makefile
@@ -8,7 +8,11 @@
 TESTS_DIR = ../../..
 
 ANALYZER = checkers
-INFER_OPTIONS = --no-filtering --debug-exceptions --default-checkers --resource-leak --suggest-nullable
+INFER_OPTIONS = \
+  --debug-exceptions --dynamic-dispatch none --no-default-checkers \
+  --annotation-reachability --fragment-retains-view --immutable-cast --printf-args --quandary \
+  --suggest-nullable --threadsafety \
+
 INFERPRINT_OPTIONS = --issues-tests
 SOURCES = $(wildcard *.java)
 
diff --git a/infer/tests/codetoanalyze/java/harness/Makefile b/infer/tests/codetoanalyze/java/harness/Makefile
index 4bef3c191..8484949d8 100644
--- a/infer/tests/codetoanalyze/java/harness/Makefile
+++ b/infer/tests/codetoanalyze/java/harness/Makefile
@@ -8,7 +8,7 @@
 TESTS_DIR = ../../..
 
 ANALYZER = infer
-INFER_OPTIONS = --android-harness --no-filtering --debug-exceptions
+INFER_OPTIONS = --android-harness --debug-exceptions
 INFERPRINT_OPTIONS = --issues-fields "file,procedure,line_offset,bug_type" --issues-tests
 SOURCES = \
   BasicHarnessActivity.java \
diff --git a/infer/tests/codetoanalyze/java/infer/Makefile b/infer/tests/codetoanalyze/java/infer/Makefile
index 372c215ec..87aee0ea2 100644
--- a/infer/tests/codetoanalyze/java/infer/Makefile
+++ b/infer/tests/codetoanalyze/java/infer/Makefile
@@ -13,3 +13,5 @@ INFERPRINT_OPTIONS = --issues-tests
 SOURCES = $(wildcard *.java)
 
 include $(TESTS_DIR)/javac.make
+
+infer-out/report.json: .inferconfig
diff --git a/infer/tests/codetoanalyze/java/quandary/Makefile b/infer/tests/codetoanalyze/java/quandary/Makefile
index 27c39b864..284049ad2 100644
--- a/infer/tests/codetoanalyze/java/quandary/Makefile
+++ b/infer/tests/codetoanalyze/java/quandary/Makefile
@@ -8,7 +8,7 @@
 TESTS_DIR = ../../..
 
 ANALYZER = checkers
-INFER_OPTIONS = --quandary --passthroughs --no-filtering --debug-exceptions
+INFER_OPTIONS = --quandary-only --passthroughs --debug-exceptions
 INFERPRINT_OPTIONS = --issues-tests
 SOURCES = $(wildcard *.java)
 
diff --git a/infer/tests/codetoanalyze/java/threadsafety/Makefile b/infer/tests/codetoanalyze/java/threadsafety/Makefile
index e44c852be..2466f085c 100644
--- a/infer/tests/codetoanalyze/java/threadsafety/Makefile
+++ b/infer/tests/codetoanalyze/java/threadsafety/Makefile
@@ -8,7 +8,7 @@
 TESTS_DIR = ../../..
 
 ANALYZER = checkers
-INFER_OPTIONS = --threadsafety --no-filtering --debug-exceptions
+INFER_OPTIONS = --threadsafety-only --debug-exceptions
 INFERPRINT_OPTIONS = --issues-tests
 SOURCES = $(wildcard *.java)
 
diff --git a/infer/tests/codetoanalyze/java/tracing/Makefile b/infer/tests/codetoanalyze/java/tracing/Makefile
index 9aa408024..0888b21b5 100644
--- a/infer/tests/codetoanalyze/java/tracing/Makefile
+++ b/infer/tests/codetoanalyze/java/tracing/Makefile
@@ -8,7 +8,7 @@
 TESTS_DIR = ../../..
 
 ANALYZER = infer
-INFER_OPTIONS = --tracing --no-filtering --debug-exceptions
+INFER_OPTIONS = --tracing --debug-exceptions
 INFERPRINT_OPTIONS = --issues-tests
 SOURCES = $(wildcard *.java)
 
diff --git a/infer/tests/codetoanalyze/objc/checkers/Nullable.m b/infer/tests/codetoanalyze/objc/checkers/Nullable.m
index 0aa88fd1b..bcedc48b5 100644
--- a/infer/tests/codetoanalyze/objc/checkers/Nullable.m
+++ b/infer/tests/codetoanalyze/objc/checkers/Nullable.m
@@ -42,7 +42,7 @@ int* __nullable returnsNull();
   }
 }
 
-- (int)testUnnanotatedFieldInClosureBad {
+- (int)DeadStoreFP_testUnnanotatedFieldInClosureBad {
   int (^testField)(int defaultValue);
   testField = ^(int defaultValue) {
     if (unnanotatedField != nil) {
diff --git a/infer/tests/codetoanalyze/objc/checkers/issues.exp b/infer/tests/codetoanalyze/objc/checkers/issues.exp
index 731694438..ed6f9f3c9 100644
--- a/infer/tests/codetoanalyze/objc/checkers/issues.exp
+++ b/infer/tests/codetoanalyze/objc/checkers/issues.exp
@@ -1,3 +1,4 @@
+codetoanalyze/objc/checkers/Nullable.m, T_DeadStoreFP_testUnnanotatedFieldInClosureBad, 2, DEAD_STORE, [Write of unused value]
 codetoanalyze/objc/checkers/Nullable.m, T_FP_dereferenceNonnullFieldAfterTestForNullOkay, 1, FIELD_SHOULD_BE_NULLABLE, [Field nonnullField is compared to null here]
 codetoanalyze/objc/checkers/Nullable.m, T_FP_dereferenceNonnullFieldAfterTestForNullOkay, 2, NULL_DEREFERENCE, [start of procedure FP_dereferenceNonnullFieldAfterTestForNullOkay,Condition is true]
 codetoanalyze/objc/checkers/Nullable.m, T_assignNonnullFieldToNullBad, 1, FIELD_SHOULD_BE_NULLABLE, [Field nonnullField is assigned null here]
@@ -9,4 +10,4 @@ codetoanalyze/objc/checkers/Nullable.m, T_dereferenceUnnanotatedFieldAfterTestFo
 codetoanalyze/objc/checkers/Nullable.m, T_dereferenceUnnanotatedFieldAfterTestForNullBad, 2, NULL_DEREFERENCE, [start of procedure dereferenceUnnanotatedFieldAfterTestForNullBad,Condition is true]
 codetoanalyze/objc/checkers/Nullable.m, T_testNonnullFieldForNullBad, 1, FIELD_SHOULD_BE_NULLABLE, [Field nonnullField is compared to null here]
 codetoanalyze/objc/checkers/Nullable.m, T_testUnnanotatedFieldForNullBad, 1, FIELD_SHOULD_BE_NULLABLE, [Field unnanotatedField is compared to null here]
-codetoanalyze/objc/checkers/Nullable.m, __objc_anonymous_block_T_testUnnanotatedFieldInClosureBad______1, 1, FIELD_SHOULD_BE_NULLABLE, [Field unnanotatedField is compared to null here]
+codetoanalyze/objc/checkers/Nullable.m, __objc_anonymous_block_T_DeadStoreFP_testUnnanotatedFieldInClosureBad______1, 1, FIELD_SHOULD_BE_NULLABLE, [Field unnanotatedField is compared to null here]
diff --git a/infer/tests/javac.make b/infer/tests/javac.make
index a55a5eeff..e8ea49ba3 100644
--- a/infer/tests/javac.make
+++ b/infer/tests/javac.make
@@ -24,6 +24,6 @@ $(OBJECTS): $(SOURCES)
 
 infer-out/report.json: $(JAVA_DEPS) $(SOURCES) $(MAKEFILE_LIST)
 	$(QUIET)$(call silent_on_success,Testing infer/java$(ANALYZER_STRING) in $(TEST_REL_DIR),\
-	  $(INFER_BIN) -a $(ANALYZER) --no-default-checkers --project-root $(PROJECT_ROOT) \
+	  $(INFER_BIN) -a $(ANALYZER) --project-root $(PROJECT_ROOT) \
 	    $(INFER_OPTIONS) -- \
 	    $(JAVAC) -cp $(CLASSPATH) $(SOURCES))