[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
master
Jeremy Dubreil 6 years ago committed by Facebook Github Bot
parent 3cffdb9745
commit 735b28f359

@ -607,19 +607,6 @@ let severity_string = function
| Warning -> | Warning ->
"WARNING" "WARNING"
(** string describing an error class *)
let err_class_string = function
| Checker ->
"CHECKER"
| Prover ->
"PROVER"
| Nocat ->
""
| Linters ->
"Linters"
(** pretty print an error *) (** pretty print an error *)
let pp_err loc severity ex_name desc ocaml_pos_opt fmt () = 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 let kind = severity_string (if equal_severity severity Info then Warning else severity) in

@ -144,8 +144,6 @@ exception Use_after_free of Localise.error_desc * Logging.ocaml_pos
exception Wrong_argument_number of 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 val severity_string : severity -> string
(** string describing an error kind *) (** string describing an error kind *)

@ -19,7 +19,6 @@ type extra = {
} }
type jsonbug = { type jsonbug = {
bug_class : string;
kind : string; kind : string;
bug_type : string; bug_type : string;
?doc_url : string option; ?doc_url : string option;

@ -302,8 +302,7 @@ module JsonIssuePrinter = MakeJsonListPrinter (struct
Typ.Procname.to_string proc_name Typ.Procname.to_string proc_name
in in
let bug = let bug =
{ Jsonbug_j.bug_class= Exceptions.err_class_string err_data.err_class { Jsonbug_j.kind= severity
; kind= severity
; bug_type ; bug_type
; qualifier ; qualifier
; severity ; severity
@ -377,8 +376,6 @@ let pp_custom_of_report fmt report fields =
in in
let pp_field index field = let pp_field index field =
match field with match field with
| `Issue_field_bug_class ->
Format.fprintf fmt "%s%s" (comma_separator index) issue.bug_class
| `Issue_field_kind -> | `Issue_field_kind ->
Format.fprintf fmt "%s%s" (comma_separator index) issue.kind Format.fprintf fmt "%s%s" (comma_separator index) issue.kind
| `Issue_field_bug_type -> | `Issue_field_bug_type ->

@ -48,8 +48,7 @@ let ml_bucket_symbols =
let issues_fields_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) ; ("bug_type", `Issue_field_bug_type)
; ("bucket", `Issue_field_bucket) ; ("bucket", `Issue_field_bucket)
; ("qualifier", `Issue_field_qualifier) ; ("qualifier", `Issue_field_qualifier)

@ -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 iphoneos_target_sdk_version_path_regex : iphoneos_target_sdk_version_path_regex list
val issues_fields : val issues_fields :
[ `Issue_field_bug_class [ `Issue_field_kind
| `Issue_field_kind
| `Issue_field_bug_type | `Issue_field_bug_type
| `Issue_field_qualifier | `Issue_field_qualifier
| `Issue_field_severity | `Issue_field_severity

@ -7,14 +7,13 @@
open! IStd open! IStd
let create_fake_jsonbug ?(bug_class= "bug_class") ?(kind= "kind") ?(bug_type= "bug_type") let create_fake_jsonbug ?(kind= "kind") ?(bug_type= "bug_type") ?(qualifier= "qualifier")
?(qualifier= "qualifier") ?(severity= "severity") ?(visibility= "visibility") ?(line= 1) ?(severity= "severity") ?(visibility= "visibility") ?(line= 1) ?(column= 1)
?(column= 1) ?(procedure= "procedure") ?(procedure_start_line= 1) ?(procedure= "procedure") ?(procedure_start_line= 1) ?(file= "file/at/a/certain/path.java")
?(file= "file/at/a/certain/path.java") ?(bug_trace= []) ?(node_key= "File|method|TYPE") ?(bug_trace= []) ?(node_key= "File|method|TYPE") ?(key= "1234") ?(hash= "1") ?(dotty= None)
?(key= "1234") ?(hash= "1") ?(dotty= None) ?(infer_source_loc= None) ?(infer_source_loc= None) ?(linters_def_file= Some "file/at/certain/path.al") ?doc_url ()
?(linters_def_file= Some "file/at/certain/path.al") ?doc_url () : Jsonbug_t.jsonbug = : Jsonbug_t.jsonbug =
{ bug_class { kind
; kind
; bug_type ; bug_type
; qualifier ; qualifier
; severity ; severity

Loading…
Cancel
Save