From 528f05430b8106ad2bd1e29013203fa23da6fe3e Mon Sep 17 00:00:00 2001 From: Jules Villard Date: Fri, 17 Feb 2017 07:39:11 -0800 Subject: [PATCH] [clang] rename --skip-clang-analysis-in-path to --skip-analysis-in-path Summary: Two options to do the same thing, one for Java and and one for clang, become one option to do the same thing. Reviewed By: akotulski Differential Revision: D4578472 fbshipit-source-id: fb0f21b --- infer/src/base/Config.ml | 13 ++++--------- infer/src/base/Config.mli | 1 - infer/src/clang/cLocation.ml | 2 +- 3 files changed, 5 insertions(+), 11 deletions(-) diff --git a/infer/src/base/Config.ml b/infer/src/base/Config.ml index 6e95ee757..07652d07a 100644 --- a/infer/src/base/Config.ml +++ b/infer/src/base/Config.ml @@ -1145,14 +1145,10 @@ and seconds_per_iteration = ~meta:"float" "Set the number of seconds per iteration (see --iterations)" and skip_analysis_in_path = - CLOpt.mk_string_list ~long:"skip-analysis-in-path" - ~parse_mode:CLOpt.(Infer [Clang]) - ~meta:"path prefix" "Ignore files whose path matches the given prefix" - -and skip_clang_analysis_in_path = - CLOpt.mk_string_list ~long:"skip-clang-analysis-in-path" - ~parse_mode:CLOpt.(Infer [Clang]) - ~meta:"path prefix" "Ignore files whose path matches the given prefix" + CLOpt.mk_string_list ~deprecated:["-skip-clang-analysis-in-path"] ~long:"skip-analysis-in-path" + ~parse_mode:CLOpt.(Infer [Driver]) + ~meta:"path prefix OCaml regex" + "Ignore files whose path matches the given prefix (can be specified multiple times)" and skip_translation_headers = CLOpt.mk_string_list ~deprecated:["skip_translation_headers"] ~long:"skip-translation-headers" @@ -1577,7 +1573,6 @@ and seconds_per_iteration = !seconds_per_iteration and show_buckets = !print_buckets and show_progress_bar = !progress_bar and skip_analysis_in_path = !skip_analysis_in_path -and skip_clang_analysis_in_path = !skip_clang_analysis_in_path and skip_translation_headers = !skip_translation_headers and sources = !sources and sourcepath = !sourcepath diff --git a/infer/src/base/Config.mli b/infer/src/base/Config.mli index c318693c8..9113663af 100644 --- a/infer/src/base/Config.mli +++ b/infer/src/base/Config.mli @@ -266,7 +266,6 @@ val seconds_per_iteration : float option val show_buckets : bool val show_progress_bar : bool val skip_analysis_in_path : string list -val skip_clang_analysis_in_path : string list val skip_translation_headers : string list val spec_abs_level : int val specs_library : string list diff --git a/infer/src/clang/cLocation.ml b/infer/src/clang/cLocation.ml index 10870f8ad..7c379c1b4 100644 --- a/infer/src/clang/cLocation.ml +++ b/infer/src/clang/cLocation.ml @@ -73,7 +73,7 @@ let should_translate_lib trans_unit_ctx source_range decl_trans_context ~transla || should_translate trans_unit_ctx source_range decl_trans_context ~translate_when_used let is_file_blacklisted file = - let paths = Config.skip_clang_analysis_in_path in + let paths = Config.skip_analysis_in_path in let is_file_blacklisted = List.exists ~f:(fun path -> Str.string_match (Str.regexp ("^.*/" ^ path)) file 0)