From 735b28f35981fc9c3c9818f7ca65942747c66618 Mon Sep 17 00:00:00 2001 From: Jeremy Dubreil Date: Tue, 21 Aug 2018 23:45:42 -0700 Subject: [PATCH] [infer] remove the bug_class from the Infer report Summary: This field does not seem to be used anywhere Reviewed By: mbouaziz Differential Revision: D9184595 fbshipit-source-id: d6eb62bca --- infer/src/IR/Exceptions.ml | 13 ------------- infer/src/IR/Exceptions.mli | 2 -- infer/src/atd/jsonbug.atd | 1 - infer/src/backend/InferPrint.ml | 5 +---- infer/src/base/Config.ml | 3 +-- infer/src/base/Config.mli | 3 +-- infer/src/unit/DifferentialTestsUtils.ml | 15 +++++++-------- 7 files changed, 10 insertions(+), 32 deletions(-) diff --git a/infer/src/IR/Exceptions.ml b/infer/src/IR/Exceptions.ml index 4e6fc56e2..98852463e 100644 --- a/infer/src/IR/Exceptions.ml +++ b/infer/src/IR/Exceptions.ml @@ -607,19 +607,6 @@ let severity_string = function | Warning -> "WARNING" - -(** string describing an error class *) -let err_class_string = function - | Checker -> - "CHECKER" - | Prover -> - "PROVER" - | Nocat -> - "" - | Linters -> - "Linters" - - (** pretty print an error *) let pp_err loc severity ex_name desc ocaml_pos_opt fmt () = let kind = severity_string (if equal_severity severity Info then Warning else severity) in diff --git a/infer/src/IR/Exceptions.mli b/infer/src/IR/Exceptions.mli index f441baf8d..67c3e7074 100644 --- a/infer/src/IR/Exceptions.mli +++ b/infer/src/IR/Exceptions.mli @@ -144,8 +144,6 @@ exception Use_after_free of Localise.error_desc * Logging.ocaml_pos exception Wrong_argument_number of Logging.ocaml_pos -val err_class_string : err_class -> string -(** string describing an error class *) val severity_string : severity -> string (** string describing an error kind *) diff --git a/infer/src/atd/jsonbug.atd b/infer/src/atd/jsonbug.atd index 2b9437426..fd47529ea 100644 --- a/infer/src/atd/jsonbug.atd +++ b/infer/src/atd/jsonbug.atd @@ -19,7 +19,6 @@ type extra = { } type jsonbug = { - bug_class : string; kind : string; bug_type : string; ?doc_url : string option; diff --git a/infer/src/backend/InferPrint.ml b/infer/src/backend/InferPrint.ml index b09a2fa12..a0d61a0a9 100644 --- a/infer/src/backend/InferPrint.ml +++ b/infer/src/backend/InferPrint.ml @@ -302,8 +302,7 @@ module JsonIssuePrinter = MakeJsonListPrinter (struct Typ.Procname.to_string proc_name in let bug = - { Jsonbug_j.bug_class= Exceptions.err_class_string err_data.err_class - ; kind= severity + { Jsonbug_j.kind= severity ; bug_type ; qualifier ; severity @@ -377,8 +376,6 @@ let pp_custom_of_report fmt report fields = in let pp_field index field = match field with - | `Issue_field_bug_class -> - Format.fprintf fmt "%s%s" (comma_separator index) issue.bug_class | `Issue_field_kind -> Format.fprintf fmt "%s%s" (comma_separator index) issue.kind | `Issue_field_bug_type -> diff --git a/infer/src/base/Config.ml b/infer/src/base/Config.ml index 4609a4fae..46e5eb19e 100644 --- a/infer/src/base/Config.ml +++ b/infer/src/base/Config.ml @@ -48,8 +48,7 @@ let ml_bucket_symbols = let issues_fields_symbols = - [ ("bug_class", `Issue_field_bug_class) - ; ("kind", `Issue_field_kind) + [ ("kind", `Issue_field_kind) ; ("bug_type", `Issue_field_bug_type) ; ("bucket", `Issue_field_bucket) ; ("qualifier", `Issue_field_qualifier) diff --git a/infer/src/base/Config.mli b/infer/src/base/Config.mli index fcd438c88..4999a284b 100644 --- a/infer/src/base/Config.mli +++ b/infer/src/base/Config.mli @@ -396,8 +396,7 @@ type iphoneos_target_sdk_version_path_regex = {path: Str.regexp; version: string val iphoneos_target_sdk_version_path_regex : iphoneos_target_sdk_version_path_regex list val issues_fields : - [ `Issue_field_bug_class - | `Issue_field_kind + [ `Issue_field_kind | `Issue_field_bug_type | `Issue_field_qualifier | `Issue_field_severity diff --git a/infer/src/unit/DifferentialTestsUtils.ml b/infer/src/unit/DifferentialTestsUtils.ml index 5d6081b43..4cf7eec2a 100644 --- a/infer/src/unit/DifferentialTestsUtils.ml +++ b/infer/src/unit/DifferentialTestsUtils.ml @@ -7,14 +7,13 @@ open! IStd -let create_fake_jsonbug ?(bug_class= "bug_class") ?(kind= "kind") ?(bug_type= "bug_type") - ?(qualifier= "qualifier") ?(severity= "severity") ?(visibility= "visibility") ?(line= 1) - ?(column= 1) ?(procedure= "procedure") ?(procedure_start_line= 1) - ?(file= "file/at/a/certain/path.java") ?(bug_trace= []) ?(node_key= "File|method|TYPE") - ?(key= "1234") ?(hash= "1") ?(dotty= None) ?(infer_source_loc= None) - ?(linters_def_file= Some "file/at/certain/path.al") ?doc_url () : Jsonbug_t.jsonbug = - { bug_class - ; kind +let create_fake_jsonbug ?(kind= "kind") ?(bug_type= "bug_type") ?(qualifier= "qualifier") + ?(severity= "severity") ?(visibility= "visibility") ?(line= 1) ?(column= 1) + ?(procedure= "procedure") ?(procedure_start_line= 1) ?(file= "file/at/a/certain/path.java") + ?(bug_trace= []) ?(node_key= "File|method|TYPE") ?(key= "1234") ?(hash= "1") ?(dotty= None) + ?(infer_source_loc= None) ?(linters_def_file= Some "file/at/certain/path.al") ?doc_url () + : Jsonbug_t.jsonbug = + { kind ; bug_type ; qualifier ; severity