add skip_translation_headers 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: D3304784

fbshipit-source-id: 0c39b39
master
Jules Villard 9 years ago committed by Facebook Github Bot 8
parent 13cb7d8ed9
commit aec3d0ccdf

@ -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

@ -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

@ -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))

@ -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

@ -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)

Loading…
Cancel
Save