diff --git a/infer/src/backend/config.ml b/infer/src/backend/config.ml index 0cba6090e..151036afe 100644 --- a/infer/src/backend/config.ml +++ b/infer/src/backend/config.ml @@ -634,6 +634,10 @@ and seconds_per_iteration = CLOpt.mk_float ~deprecated:["seconds_per_iteration"] ~long:"seconds-per-iteration" ~default:0. ~meta:"float" "Set the number of seconds per iteration" +and skip_translation_headers = + CLOpt.mk_string_list ~deprecated:["skip_translation_headers"] ~long:"skip-translation-headers" + ~meta:"path prefix" "Ignore headers whose path matches the given prefix" + and source_file = CLOpt.mk_string_opt ~long:"source-file" ~short:"c" ~meta:"file" "File to translate" @@ -1075,6 +1079,7 @@ and save_analysis_results = !save_results and seconds_per_iteration = !seconds_per_iteration and show_buckets = !print_buckets and show_progress_bar = !progress_bar +and skip_translation_headers = !skip_translation_headers and source_file = !source_file and source_file_copy = !source_file_copy and spec_abs_level = !spec_abs_level diff --git a/infer/src/backend/config.mli b/infer/src/backend/config.mli index a0c1e798e..d4ac970b2 100644 --- a/infer/src/backend/config.mli +++ b/infer/src/backend/config.mli @@ -169,6 +169,7 @@ val save_analysis_results : string option val seconds_per_iteration : float val show_buckets : bool val show_progress_bar : bool +val skip_translation_headers : string list val source_file : string option val source_file_copy : string option val spec_abs_level : int diff --git a/infer/src/backend/inferconfig.ml b/infer/src/backend/inferconfig.ml index 215d09174..0b34b1f98 100644 --- a/infer/src/backend/inferconfig.ml +++ b/infer/src/backend/inferconfig.ml @@ -407,8 +407,5 @@ let test () = matching_s) (Sys.getcwd ()) -let skip_translation_headers = - lazy (lookup_string_list "skip_translation_headers" (Lazy.force Config.inferconfig_json)) - let skip_clang_analysis_in_path = lazy (lookup_string_list "skip-clang-analysis-in-path" (Lazy.force Config.inferconfig_json)) diff --git a/infer/src/backend/inferconfig.mli b/infer/src/backend/inferconfig.mli index a283433df..bf6a7f30f 100644 --- a/infer/src/backend/inferconfig.mli +++ b/infer/src/backend/inferconfig.mli @@ -50,8 +50,6 @@ end (** Load the config file and list the files to report on *) val test: unit -> unit -val skip_translation_headers : string list Lazy.t - val skip_clang_analysis_in_path : string list Lazy.t (** is_checker_enabled [error_name] is [true] if [error_name] is whitelisted in .inferconfig or if diff --git a/infer/src/clang/cLocation.ml b/infer/src/clang/cLocation.ml index fb6e396f0..3cfa89866 100644 --- a/infer/src/clang/cLocation.ml +++ b/infer/src/clang/cLocation.ml @@ -80,7 +80,7 @@ let file_in_project file = match Config.project_root with | Some root -> let file_in_project = string_is_prefix root file in - let paths = Lazy.force Inferconfig.skip_translation_headers in + let paths = Config.skip_translation_headers in let file_should_be_skipped = IList.exists (fun path -> string_is_prefix (Filename.concat root path) file)