diff --git a/infer/man/man1/infer-full.txt b/infer/man/man1/infer-full.txt index fbd98e6ca..ca244cad4 100644 --- a/infer/man/man1/infer-full.txt +++ b/infer/man/man1/infer-full.txt @@ -2155,11 +2155,6 @@ INTERNAL OPTIONS which specify the relevant arguments. (Conversely: --no-test-determinator) - --test-filtering - Activates: List all the files Infer can report on (should be - called from the root of the project) (Conversely: - --no-test-filtering) - --testing-mode Activates: Mode for testing, where no headers are translated, and dot files are created (clang only) (Conversely: --no-testing-mode) diff --git a/infer/src/IR/inferconfig.ml b/infer/src/IR/inferconfig.ml index 314af2397..049a5f311 100644 --- a/infer/src/IR/inferconfig.ml +++ b/infer/src/IR/inferconfig.ml @@ -359,17 +359,3 @@ let filters_from_inferconfig inferconfig : filters = (* Create filters based on configuration options *) let create_filters () = if not Config.filter_paths then do_not_filter else filters_from_inferconfig (load_filters ()) - - -(** This function loads and list the path that are being filtered by the analyzer. The results are - of the form: path/to/file.java -> true/false meaning that analysis results will be reported on - path/to/file.java or not *) -let test () = - let filters = create_filters () in - let matches path = filters.path_filter path in - Sys.getcwd () - |> Utils.directory_iter (fun path -> - if DB.is_source_file path then - let source_file = SourceFile.from_abs_path path in - let matching = matches source_file in - L.result "%s -> %b@." (SourceFile.to_rel_path source_file) matching ) diff --git a/infer/src/IR/inferconfig.mli b/infer/src/IR/inferconfig.mli index ebf7b278e..23e3dba76 100644 --- a/infer/src/IR/inferconfig.mli +++ b/infer/src/IR/inferconfig.mli @@ -28,6 +28,3 @@ val skip_translation_matcher : SourceFile.t -> Procname.t -> bool val skip_implementation_matcher : SourceFile.t -> Procname.t -> bool val modeled_expensive_matcher : (string -> bool) -> Procname.t -> bool - -val test : unit -> unit -(** Load the config file and list the files to report on *) diff --git a/infer/src/backend/Summary.ml b/infer/src/backend/Summary.ml index d18760fe1..8d9c5535f 100644 --- a/infer/src/backend/Summary.ml +++ b/infer/src/backend/Summary.ml @@ -8,7 +8,6 @@ open! IStd module F = Format -module L = Logging module Stats = struct type t = @@ -349,11 +348,7 @@ module OnDisk = struct let make_filtered_iterator_from_config ~iter ~f = let filter = - if Option.is_some Config.procedures_filter then ( - if Config.test_filtering then ( - Inferconfig.test () ; - L.exit 0 ) ; - Lazy.force Filtering.procedures_filter ) + if Option.is_some Config.procedures_filter then Lazy.force Filtering.procedures_filter else fun _ _ -> true in iter ~filter ~f diff --git a/infer/src/base/Config.ml b/infer/src/base/Config.ml index cea841507..44c2d2eb3 100644 --- a/infer/src/base/Config.ml +++ b/infer/src/base/Config.ml @@ -197,8 +197,6 @@ let save_compact_summaries = true (** If true enables printing proposition compatible for the SMT project *) let smt_output = false -let source_file_extentions = [".java"; ".m"; ".mm"; ".c"; ".cc"; ".cpp"; ".h"] - let kotlin_source_extension = ".kt" (** Enable detailed tracing information during array abstraction *) @@ -2506,11 +2504,6 @@ and test_determinator = $(b,--profiler-samples) flags, which specify the relevant arguments." -and test_filtering = - CLOpt.mk_bool ~deprecated:["test_filtering"] ~long:"test-filtering" - "List all the files Infer can report on (should be called from the root of the project)" - - and topl_max_conjuncts = CLOpt.mk_int ~long:"topl-max-conjuncts" ~default:20 "Stop tracking states that reach have at least $(i,int) conjuncts" @@ -3510,8 +3503,6 @@ and test_determinator = !test_determinator and export_changed_functions = !export_changed_functions -and test_filtering = !test_filtering - and profiler_samples = !profiler_samples and testing_mode = !testing_mode diff --git a/infer/src/base/Config.mli b/infer/src/base/Config.mli index 7eeed0c67..fdac29e4b 100644 --- a/infer/src/base/Config.mli +++ b/infer/src/base/Config.mli @@ -104,8 +104,6 @@ val save_compact_summaries : bool val smt_output : bool -val source_file_extentions : string list - val unsafe_unret : string val weak : string @@ -653,8 +651,6 @@ val test_determinator : bool val export_changed_functions : bool -val test_filtering : bool - val testing_mode : bool val threadsafe_aliases : Yojson.Basic.t diff --git a/infer/src/base/DB.ml b/infer/src/base/DB.ml index b5bcecb36..836ca5a11 100644 --- a/infer/src/base/DB.ml +++ b/infer/src/base/DB.ml @@ -154,6 +154,3 @@ module Results_dir = struct let full_fname = Filename.concat (create dir_path) filename in Unix.openfile full_fname ~mode:Unix.[O_WRONLY; O_CREAT; O_TRUNC] ~perm:0o777 end - -let is_source_file path = - List.exists ~f:(fun ext -> Filename.check_suffix path ext) Config.source_file_extentions diff --git a/infer/src/base/DB.mli b/infer/src/base/DB.mli index a52f4a5eb..1f959a00e 100644 --- a/infer/src/base/DB.mli +++ b/infer/src/base/DB.mli @@ -67,6 +67,3 @@ val source_dir_get_internal_file : source_dir -> string -> filename val source_dir_from_source_file : SourceFile.t -> source_dir (** get the source directory corresponding to a source file *) - -val is_source_file : string -> bool -(** Check if a path is a Java, C, C++ or Objectve C source file according to the file extention *)