diff --git a/Makefile b/Makefile index b995c4b28ad..1768bdf1ed2 100644 --- a/Makefile +++ b/Makefile @@ -273,7 +273,6 @@ DIRECT_TESTS += \ java_fb-config-impact \ java_fb-config-impact-paths \ java_fb-config-impact-strict \ - java_fb-config-impact-strict-beta-paths \ java_fb-immutability \ java_fb-performance endif diff --git a/infer/documentation/issues/CONFIG_IMPACT_STRICT_BETA.md b/infer/documentation/issues/CONFIG_IMPACT_STRICT_BETA.md deleted file mode 100644 index a107629bc55..00000000000 --- a/infer/documentation/issues/CONFIG_IMPACT_STRICT_BETA.md +++ /dev/null @@ -1,2 +0,0 @@ -This is similar to [`CONFIG_IMPACT_STRICT` issue](#config_impact_strict) but it is only used for -beta testing that fine-tunes the checker to analysis targets. diff --git a/infer/man/man1/infer-full.txt b/infer/man/man1/infer-full.txt index c6be7b1cb3b..f53a91efbe8 100644 --- a/infer/man/man1/infer-full.txt +++ b/infer/man/man1/infer-full.txt @@ -524,7 +524,6 @@ OPTIONS CONDITION_ALWAYS_TRUE (disabled by default), CONFIG_IMPACT (disabled by default), CONFIG_IMPACT_STRICT (disabled by default), - CONFIG_IMPACT_STRICT_BETA (disabled by default), CONFIG_USAGE (disabled by default), CONSTANT_ADDRESS_DEREFERENCE (disabled by default), CONSTANT_ADDRESS_DEREFERENCE_LATENT (disabled by default), @@ -2251,13 +2250,6 @@ INTERNAL OPTIONS --config-impact-previous-reset Cancel the effect of --config-impact-previous. - --config-impact-strict-beta-mode-paths +path_regex - Similar to --config-impact-strict-mode-paths, but the paths are - used only for beta testing. - - --config-impact-strict-beta-mode-paths-reset - Set --config-impact-strict-beta-mode-paths to the empty list. - --config-impact-strict-mode Activates: Make the config impact analysis stricter. It disables all heuristics of ignoring cheap method calls. (Conversely: diff --git a/infer/man/man1/infer-report.txt b/infer/man/man1/infer-report.txt index d67b20e220f..7eb878b67f3 100644 --- a/infer/man/man1/infer-report.txt +++ b/infer/man/man1/infer-report.txt @@ -143,7 +143,6 @@ OPTIONS CONDITION_ALWAYS_TRUE (disabled by default), CONFIG_IMPACT (disabled by default), CONFIG_IMPACT_STRICT (disabled by default), - CONFIG_IMPACT_STRICT_BETA (disabled by default), CONFIG_USAGE (disabled by default), CONSTANT_ADDRESS_DEREFERENCE (disabled by default), CONSTANT_ADDRESS_DEREFERENCE_LATENT (disabled by default), diff --git a/infer/man/man1/infer.txt b/infer/man/man1/infer.txt index 7d60607f886..6d334d1d2f3 100644 --- a/infer/man/man1/infer.txt +++ b/infer/man/man1/infer.txt @@ -524,7 +524,6 @@ OPTIONS CONDITION_ALWAYS_TRUE (disabled by default), CONFIG_IMPACT (disabled by default), CONFIG_IMPACT_STRICT (disabled by default), - CONFIG_IMPACT_STRICT_BETA (disabled by default), CONFIG_USAGE (disabled by default), CONSTANT_ADDRESS_DEREFERENCE (disabled by default), CONSTANT_ADDRESS_DEREFERENCE_LATENT (disabled by default), diff --git a/infer/src/atd/jsonconfigimpact.atd b/infer/src/atd/jsonconfigimpact.atd index 8f2a3e04acd..1fc8f137d43 100644 --- a/infer/src/atd/jsonconfigimpact.atd +++ b/infer/src/atd/jsonconfigimpact.atd @@ -7,7 +7,7 @@ type loc = abstract type sub_item = {hash: string ; loc: loc ; procedure_name: string ; procedure_id: string } -type config_impact_mode = [Normal | StrictBeta | Strict] +type config_impact_mode = [Normal | Strict] type item = { inherit sub_item; diff --git a/infer/src/base/Config.ml b/infer/src/base/Config.ml index d639a5d1907..216756010c2 100644 --- a/infer/src/base/Config.ml +++ b/infer/src/base/Config.ml @@ -1224,8 +1224,10 @@ and config_impact_strict_mode_paths = runs as non-strict mode; otherwise, it runs as strict mode, but for all paths." -and config_impact_strict_beta_mode_paths = - CLOpt.mk_string_list ~long:"config-impact-strict-beta-mode-paths" ~meta:"path_regex" +and _config_impact_strict_beta_mode_paths = + CLOpt.mk_string_list + ~deprecated:["-config-impact-strict-beta-mode-paths"] + ~long:"" ~meta:"path_regex" "Similar to $(b,--config-impact-strict-mode-paths), but the paths are used only for beta \ testing." @@ -3839,10 +3841,6 @@ and config_impact_strict_mode = !config_impact_strict_mode and config_impact_strict_mode_paths = RevList.rev_map !config_impact_strict_mode_paths ~f:Str.regexp -and config_impact_strict_beta_mode_paths = - RevList.rev_map !config_impact_strict_beta_mode_paths ~f:Str.regexp - - and config_impact_test_paths = RevList.rev_map !config_impact_test_paths ~f:Str.regexp and continue_analysis = !continue_analysis diff --git a/infer/src/base/Config.mli b/infer/src/base/Config.mli index cd1e5aef797..59c6a981c89 100644 --- a/infer/src/base/Config.mli +++ b/infer/src/base/Config.mli @@ -298,8 +298,6 @@ val config_impact_strict_mode : bool val config_impact_strict_mode_paths : Str.regexp list -val config_impact_strict_beta_mode_paths : Str.regexp list - val config_impact_test_paths : Str.regexp list val continue_analysis : bool diff --git a/infer/src/base/IssueType.ml b/infer/src/base/IssueType.ml index e40d44daab2..dd4f6d045a2 100644 --- a/infer/src/base/IssueType.ml +++ b/infer/src/base/IssueType.ml @@ -432,11 +432,6 @@ let config_impact_analysis_strict = ~user_documentation:[%blob "./documentation/issues/CONFIG_IMPACT_STRICT.md"] -let config_impact_analysis_strict_beta = - register ~enabled:false ~id:"CONFIG_IMPACT_STRICT_BETA" Advice ConfigImpactAnalysis - ~user_documentation:[%blob "./documentation/issues/CONFIG_IMPACT_STRICT_BETA.md"] - - let pulse_config_usage = register ~enabled:false ~id:"CONFIG_USAGE" Info Pulse ~user_documentation:[%blob "./documentation/issues/CONFIG_USAGE.md"] diff --git a/infer/src/base/IssueType.mli b/infer/src/base/IssueType.mli index 5180da4ae61..18756b5cf21 100644 --- a/infer/src/base/IssueType.mli +++ b/infer/src/base/IssueType.mli @@ -145,8 +145,6 @@ val config_impact_analysis : t val config_impact_analysis_strict : t -val config_impact_analysis_strict_beta : t - val pulse_config_usage : t val pulse_const_refable : t diff --git a/infer/src/cost/ConfigImpactAnalysis.ml b/infer/src/cost/ConfigImpactAnalysis.ml index dc841bb2443..eac5b5954b0 100644 --- a/infer/src/cost/ConfigImpactAnalysis.ml +++ b/infer/src/cost/ConfigImpactAnalysis.ml @@ -17,10 +17,6 @@ let is_in_strict_mode_paths file = SourceFile.is_matching Config.config_impact_strict_mode_paths file -let is_in_strict_beta_mode_paths file = - SourceFile.is_matching Config.config_impact_strict_beta_mode_paths file - - let is_in_test_paths file = SourceFile.is_matching Config.config_impact_test_paths file let mode = @@ -30,13 +26,9 @@ let mode = | None -> (* NOTE: ConfigImpact analysis assumes that non-empty changed files are always given. The next condition check is only for checker's tests. *) - if not (List.is_empty Config.config_impact_strict_mode_paths) then `Strict - else if not (List.is_empty Config.config_impact_strict_beta_mode_paths) then `StrictBeta - else `Normal + if not (List.is_empty Config.config_impact_strict_mode_paths) then `Strict else `Normal | Some changed_files -> - if SourceFile.Set.exists is_in_strict_mode_paths changed_files then `Strict - else if SourceFile.Set.exists is_in_strict_beta_mode_paths changed_files then `StrictBeta - else `Normal + if SourceFile.Set.exists is_in_strict_mode_paths changed_files then `Strict else `Normal module Branch = struct @@ -967,7 +959,7 @@ module Dom = struct in let is_unmodeled_call = match instantiated_cost with Some NoModel -> true | _ -> false in match mode with - | `StrictBeta | `Strict -> ( + | `Strict -> ( let is_static = Procname.is_static callee in match (callee_summary, expensiveness_model) with | _, Some KnownCheap -> diff --git a/infer/src/cost/ConfigImpactAnalysis.mli b/infer/src/cost/ConfigImpactAnalysis.mli index 3d54603ba16..8b67bde2bd6 100644 --- a/infer/src/cost/ConfigImpactAnalysis.mli +++ b/infer/src/cost/ConfigImpactAnalysis.mli @@ -13,8 +13,6 @@ val pp_mode : Format.formatter -> mode -> unit val is_in_strict_mode_paths : SourceFile.t -> bool -val is_in_strict_beta_mode_paths : SourceFile.t -> bool - val mode : mode module LatentConfig : sig diff --git a/infer/src/integration/ConfigImpactIssuesTest.ml b/infer/src/integration/ConfigImpactIssuesTest.ml index bcd58d1e909..4c33a398ef1 100644 --- a/infer/src/integration/ConfigImpactIssuesTest.ml +++ b/infer/src/integration/ConfigImpactIssuesTest.ml @@ -12,13 +12,7 @@ let pp_custom_of_config_impact_report fmt report = let pp_custom_of_config_impact_issue fmt (config_impact_item : Jsonconfigimpact_t.item) = let open Jsonbug_t in F.fprintf fmt "%s%s, %s, {%a}@\n" - ( match config_impact_item.mode with - | `Normal -> - "" - | `StrictBeta -> - "[STRICT BETA] " - | `Strict -> - "[STRICT] " ) + (match config_impact_item.mode with `Normal -> "" | `Strict -> "[STRICT] ") config_impact_item.procedure_name config_impact_item.loc.file ConfigImpactAnalysis.UncheckedCallees.pp_without_location (ConfigImpactAnalysis.UncheckedCallees.decode config_impact_item.unchecked_callees) diff --git a/infer/src/integration/Differential.ml b/infer/src/integration/Differential.ml index a67d42e3630..635cf20bede 100644 --- a/infer/src/integration/Differential.ml +++ b/infer/src/integration/Differential.ml @@ -451,8 +451,6 @@ module ConfigImpactItem = struct match config_impact_item.mode with | `Normal -> IssueType.config_impact_analysis - | `StrictBeta -> - IssueType.config_impact_analysis_strict_beta | `Strict -> IssueType.config_impact_analysis_strict in diff --git a/infer/src/integration/JsonReports.ml b/infer/src/integration/JsonReports.ml index ef833f7d5ab..9613389d81d 100644 --- a/infer/src/integration/JsonReports.ml +++ b/infer/src/integration/JsonReports.ml @@ -377,7 +377,6 @@ let write_config_impact proc_name loc config_impact_opt (outfile : Utils.outfile Config.is_checker_enabled Checker.ConfigImpactAnalysis && ( (Config.config_impact_strict_mode && List.is_empty Config.config_impact_strict_mode_paths) || ConfigImpactAnalysis.is_in_strict_mode_paths loc.Location.file - || ConfigImpactAnalysis.is_in_strict_beta_mode_paths loc.Location.file || ExternalConfigImpactData.is_in_config_data_file proc_name ) && is_in_files_to_analyze loc then diff --git a/infer/tests/codetoanalyze/java/fb-config-impact-strict-beta-paths/Makefile b/infer/tests/codetoanalyze/java/fb-config-impact-strict-beta-paths/Makefile deleted file mode 100644 index f417d67087c..00000000000 --- a/infer/tests/codetoanalyze/java/fb-config-impact-strict-beta-paths/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -# Copyright (c) Facebook, Inc. and its affiliates. -# -# This source code is licensed under the MIT license found in the -# LICENSE file in the root directory of this source tree. - -TESTS_DIR = ../../.. - -# NOTE: This test is similar to fb-config-impact-paths, but gives the paths option for strict-beta -# mode. We introduced a separate test here because strict and strict-beta modes cannot run together -# when both paths for them are given. - -INFER_OPTIONS = --config-impact-analysis-only \ - --config-impact-strict-beta-mode-paths '.*/InStrictBetaModePaths.java' \ - --debug-exceptions --report-force-relative-path -INFERPRINT_OPTIONS = --issues-tests -SOURCES = $(wildcard *.java) - -include $(TESTS_DIR)/javac.make -include $(TESTS_DIR)/config-impact.make