add skip_clang_analysis_in_path from inferconfig to the CLI

Summary:
Part of the migration of .inferconfig-specific options into options accepted
both by .inferconfig and the CLI.

Reviewed By: jberdine

Differential Revision: D3322508

fbshipit-source-id: 1820a9d
master
Jules Villard 9 years ago committed by Facebook Github Bot 8
parent aec3d0ccdf
commit 8f154144c0

@ -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_clang_analysis_in_path =
CLOpt.mk_string_list ~long:"skip-clang-analysis-in-path"
~exes:CLOpt.[C] ~meta:"path prefix" "Ignore files whose path matches the given prefix"
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"
@ -1079,6 +1083,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_clang_analysis_in_path = !skip_clang_analysis_in_path
and skip_translation_headers = !skip_translation_headers
and source_file = !source_file
and source_file_copy = !source_file_copy

@ -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_clang_analysis_in_path : string list
val skip_translation_headers : string list
val source_file : string option
val source_file_copy : string option

@ -406,6 +406,3 @@ let test () =
(DB.source_file_to_rel_path source_file)
matching_s)
(Sys.getcwd ())
let skip_clang_analysis_in_path =
lazy (lookup_string_list "skip-clang-analysis-in-path" (Lazy.force Config.inferconfig_json))

@ -50,8 +50,6 @@ end
(** Load the config file and list the files to report on *)
val test: unit -> unit
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
it's enabled by default *)
val is_checker_enabled : string -> bool

@ -132,7 +132,7 @@ let should_translate_lib source_range decl_trans_context =
|| should_translate source_range decl_trans_context
let is_file_blacklisted file =
let paths = Lazy.force Inferconfig.skip_clang_analysis_in_path in
let paths = Config.skip_clang_analysis_in_path in
let is_file_blacklisted =
IList.exists
(fun path -> Str.string_match (Str.regexp ("^.*/" ^ path)) file 0)

Loading…
Cancel
Save