[infer] remove the visibility field from the Infer JSON report

Reviewed By: mbouaziz

Differential Revision: D9689136

fbshipit-source-id: fabdb3ffc
master
Jeremy Dubreil 6 years ago committed by Facebook Github Bot
parent 764e9ee1be
commit 40ead0ac3d

@ -440,7 +440,7 @@ OPTIONS
multiple times) See also infer-capture(1).
--issues-fields ,-separated sequence of { bug_type | bucket |
qualifier | severity | visibility | line | column | procedure |
qualifier | severity | line | column | procedure |
procedure_start_line | file | bug_trace | key | hash | line_offset |
qualifier_contains_potential_exception_note }
Fields to emit with --issues-tests (default: file procedure

@ -114,7 +114,7 @@ OPTIONS
section
--issues-fields ,-separated sequence of { bug_type | bucket |
qualifier | severity | visibility | line | column | procedure |
qualifier | severity | line | column | procedure |
procedure_start_line | file | bug_trace | key | hash | line_offset |
qualifier_contains_potential_exception_note }
Fields to emit with --issues-tests (default: file procedure

@ -440,7 +440,7 @@ OPTIONS
multiple times) See also infer-capture(1).
--issues-fields ,-separated sequence of { bug_type | bucket |
qualifier | severity | visibility | line | column | procedure |
qualifier | severity | line | column | procedure |
procedure_start_line | file | bug_trace | key | hash | line_offset |
qualifier_contains_potential_exception_note }
Fields to emit with --issues-tests (default: file procedure

@ -19,10 +19,6 @@ type visibility =
let equal_visibility = [%compare.equal: visibility]
let string_of_visibility vis =
match vis with Exn_user -> "user" | Exn_developer -> "developer" | Exn_system -> "system"
(** class of error/warning *)
type err_class = Checker | Prover | Nocat | Linters [@@deriving compare]

@ -19,8 +19,6 @@ type visibility =
val equal_visibility : visibility -> visibility -> bool
val string_of_visibility : visibility -> string
(** severity of the report *)
type severity = Like | Info | Advice | Warning | Error [@@deriving compare]

@ -30,7 +30,6 @@ type jsonbug = {
?doc_url : string option;
qualifier : string;
severity : string;
?visibility : string option;
line: int;
column: int;
procedure : string;

@ -177,7 +177,6 @@ let issue_of_cost cost_info ~delta ~prev_cost ~curr_cost =
{ Jsonbug_j.bug_type= issue_type.IssueType.unique_id
; qualifier
; severity= Exceptions.severity_string severity
; visibility= Some (Exceptions.string_of_visibility Exceptions.Exn_user)
; line
; column
; procedure= cost_info.Jsonbug_t.procedure_id

@ -283,7 +283,6 @@ module JsonIssuePrinter = MakeJsonListPrinter (struct
| _ ->
None
in
let visibility = Some (Exceptions.string_of_visibility err_data.visibility) in
let qualifier =
let base_qualifier = error_desc_to_plain_string err_key.err_desc in
if IssueType.(equal resource_leak) err_key.err_name then
@ -302,7 +301,6 @@ module JsonIssuePrinter = MakeJsonListPrinter (struct
{ Jsonbug_j.bug_type
; qualifier
; severity
; visibility
; line= err_data.loc.Location.line
; column= err_data.loc.Location.col
; procedure= procedure_id_of_procname proc_name
@ -397,8 +395,6 @@ let pp_custom_of_report fmt report fields =
Format.fprintf fmt "%s%s" (comma_separator index) issue.qualifier
| `Issue_field_severity ->
Format.fprintf fmt "%s%s" (comma_separator index) issue.severity
| `Issue_field_visibility ->
Format.fprintf fmt "%s%a" (comma_separator index) (Pp.option String.pp) issue.visibility
| `Issue_field_line ->
Format.fprintf fmt "%s%d" (comma_separator index) issue.line
| `Issue_field_column ->

@ -42,7 +42,6 @@ let issues_fields_symbols =
; ("bucket", `Issue_field_bucket)
; ("qualifier", `Issue_field_qualifier)
; ("severity", `Issue_field_severity)
; ("visibility", `Issue_field_visibility)
; ("line", `Issue_field_line)
; ("column", `Issue_field_column)
; ("procedure", `Issue_field_procedure)

@ -415,7 +415,6 @@ val issues_fields :
| `Issue_field_qualifier
| `Issue_field_severity
| `Issue_field_bucket
| `Issue_field_visibility
| `Issue_field_line
| `Issue_field_column
| `Issue_field_procedure

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

Loading…
Cancel
Save