From acb7cf8dfe80fb38cd5f0aac3f06e4c60f69af3c Mon Sep 17 00:00:00 2001 From: Martino Luca Date: Wed, 14 Jun 2017 09:54:51 -0700 Subject: [PATCH] Remove unused `--filter-report-paths` argument Reviewed By: mbouaziz Differential Revision: D5236215 fbshipit-source-id: c8dd71f --- infer/src/backend/InferPrint.re | 16 ++-------------- infer/src/base/Config.ml | 7 ------- infer/src/base/Config.mli | 1 - 3 files changed, 2 insertions(+), 22 deletions(-) diff --git a/infer/src/backend/InferPrint.re b/infer/src/backend/InferPrint.re index 512ca3122..5cd57b98b 100644 --- a/infer/src/backend/InferPrint.re +++ b/infer/src/backend/InferPrint.re @@ -250,16 +250,6 @@ module ProcsCsv = { }; }; -let paths_to_filter = - Option.bind Config.filter_report_paths (fun f => Some (In_channel.read_lines f)) |> - Option.map f::(List.map f::SourceFile.create); - -let report_filter source_file => - switch paths_to_filter { - | Some paths => List.mem equal::SourceFile.equal paths source_file - | None => true - }; - let should_report (issue_kind: Exceptions.err_kind) issue_type error_desc eclass => if (not Config.filtering || Exceptions.equal_err_class eclass Exceptions.Linters) { true @@ -368,8 +358,7 @@ module IssuesCsv = { if ( key.in_footprint && error_filter source_file key.err_desc key.err_name && - should_report key.err_kind key.err_name key.err_desc err_data.err_class && - report_filter source_file + should_report key.err_kind key.err_name key.err_desc err_data.err_class ) { let err_desc_string = error_desc_to_csv_string key.err_desc; let err_advice_string = error_advice_to_csv_string key.err_desc; @@ -455,8 +444,7 @@ module IssuesJson = { key.in_footprint && error_filter source_file key.err_desc key.err_name && should_report_source_file && - should_report key.err_kind key.err_name key.err_desc err_data.err_class && - report_filter source_file + should_report key.err_kind key.err_name key.err_desc err_data.err_class ) { let kind = Exceptions.err_kind_string key.err_kind; let bug_type = Localise.to_issue_id key.err_name; diff --git a/infer/src/base/Config.ml b/infer/src/base/Config.ml index 042fe9817..ad684a2e1 100644 --- a/infer/src/base/Config.ml +++ b/infer/src/base/Config.ml @@ -1054,12 +1054,6 @@ and filter_paths = CLOpt.mk_bool ~long:"filter-paths" ~default:true "Filters specified in .inferconfig" -and filter_report_paths = - CLOpt.mk_string_opt - ~long:"filter-report-paths" ~in_help:CLOpt.[Report, manual_generic] - "Specify the file containing a newline-separated list of files for which to emit a report. \ - Source files should be specified relative to project root or be absolute." - and flavors = CLOpt.mk_bool ~deprecated:["-use-flavors"] ~long:"flavors" ~in_help:CLOpt.[Capture, manual_buck_flavors] @@ -1893,7 +1887,6 @@ and fcp_apple_clang = !fcp_apple_clang and fcp_syntax_only = !fcp_syntax_only and file_renamings = !file_renamings and filter_paths = !filter_paths -and filter_report_paths = !filter_report_paths and filtering = !filtering and flavors = !flavors and fragment_retains_view = !fragment_retains_view diff --git a/infer/src/base/Config.mli b/infer/src/base/Config.mli index 6e66a5da9..321482580 100644 --- a/infer/src/base/Config.mli +++ b/infer/src/base/Config.mli @@ -236,7 +236,6 @@ val fcp_apple_clang : string option val fcp_syntax_only : bool val file_renamings : string option val filter_paths : bool -val filter_report_paths : string option val filtering : bool val flavors : bool val fragment_retains_view : bool