From 66ef5f5c152f8ccf2d34d876b03815046fc37394 Mon Sep 17 00:00:00 2001 From: Jeremy Dubreil Date: Fri, 24 Aug 2018 08:42:48 -0700 Subject: [PATCH] [eradicate] always check that non-nullable fields are initialized Summary: It is easier to filter out those reports in `.inferconfig` if we want them that modifying a boolean value ddirectly in the code Reviewed By: mbouaziz Differential Revision: D9494082 fbshipit-source-id: 9fb042313 --- infer/src/eradicate/eradicate.ml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/infer/src/eradicate/eradicate.ml b/infer/src/eradicate/eradicate.ml index d2be921e8..6b39f594a 100644 --- a/infer/src/eradicate/eradicate.ml +++ b/infer/src/eradicate/eradicate.ml @@ -15,8 +15,6 @@ open Dataflow (* ERADICATE CHECKER. TODOS:*) (* 1) add support for constructors for anonymous inner classes (currently not checked) *) -(* check that nonnullable fields are initialized in constructors *) -let check_field_initialization = true (** Type for a module that provides a main callback function *) module type CallBackT = sig @@ -282,7 +280,7 @@ module MkCallback (Extension : ExtensionT) : CallBackT = struct if not calls_this (* if 'this(...)' is called, no need to check initialization *) - && check_field_initialization && checks.TypeCheck.eradicate + && checks.TypeCheck.eradicate then EradicateChecks.check_constructor_initialization tenv find_canonical_duplicate curr_pname curr_pdesc start_node Initializers.final_initializer_typestates_lazy