[infer] rename the severity variants

Summary: The `K` prefix does not make sense anymore

Reviewed By: mbouaziz

Differential Revision: D9230528

fbshipit-source-id: 74ec3dca8
master
Jeremy Dubreil 6 years ago committed by Facebook Github Bot
parent 0944763dc1
commit 59b7915177

@ -115,7 +115,7 @@ module ErrLogHash = struct
end end
(** Type of the error log, to be reset once per function. (** Type of the error log, to be reset once per function.
Map severity, fotprint / re - execution flag, error name, Map severity, footprint / re - execution flag, error name,
error description, severity, to set of err_data. *) error description, severity, to set of err_data. *)
type t = ErrDataSet.t ErrLogHash.t type t = ErrDataSet.t ErrLogHash.t
@ -159,7 +159,7 @@ let size filter (err_log: t) =
(** Print errors from error log *) (** Print errors from error log *)
let pp_errors fmt (errlog: t) = let pp_errors fmt (errlog: t) =
let f key _ = let f key _ =
if Exceptions.equal_severity key.severity Exceptions.Kerror then if Exceptions.equal_severity key.severity Exceptions.Error then
F.fprintf fmt "%a@ " IssueType.pp key.err_name F.fprintf fmt "%a@ " IssueType.pp key.err_name
in in
ErrLogHash.iter f errlog ErrLogHash.iter f errlog
@ -168,7 +168,7 @@ let pp_errors fmt (errlog: t) =
(** Print warnings from error log *) (** Print warnings from error log *)
let pp_warnings fmt (errlog: t) = let pp_warnings fmt (errlog: t) =
let f key _ = let f key _ =
if Exceptions.equal_severity key.severity Exceptions.Kwarning then if Exceptions.equal_severity key.severity Exceptions.Warning then
F.fprintf fmt "%a %a@ " IssueType.pp key.err_name Localise.pp_error_desc key.err_desc F.fprintf fmt "%a %a@ " IssueType.pp key.err_name Localise.pp_error_desc key.err_desc
in in
ErrLogHash.iter f errlog ErrLogHash.iter f errlog
@ -189,17 +189,17 @@ let pp_html source path_to_root fmt (errlog: t) =
pp_eds err_datas pp_eds err_datas
in in
F.fprintf fmt "%aERRORS DURING FOOTPRINT@\n" Io_infer.Html.pp_hline () ; F.fprintf fmt "%aERRORS DURING FOOTPRINT@\n" Io_infer.Html.pp_hline () ;
ErrLogHash.iter (pp_err_log true Exceptions.Kerror) errlog ; ErrLogHash.iter (pp_err_log true Exceptions.Error) errlog ;
F.fprintf fmt "%aERRORS DURING RE-EXECUTION@\n" Io_infer.Html.pp_hline () ; F.fprintf fmt "%aERRORS DURING RE-EXECUTION@\n" Io_infer.Html.pp_hline () ;
ErrLogHash.iter (pp_err_log false Exceptions.Kerror) errlog ; ErrLogHash.iter (pp_err_log false Exceptions.Error) errlog ;
F.fprintf fmt "%aWARNINGS DURING FOOTPRINT@\n" Io_infer.Html.pp_hline () ; F.fprintf fmt "%aWARNINGS DURING FOOTPRINT@\n" Io_infer.Html.pp_hline () ;
ErrLogHash.iter (pp_err_log true Exceptions.Kwarning) errlog ; ErrLogHash.iter (pp_err_log true Exceptions.Warning) errlog ;
F.fprintf fmt "%aWARNINGS DURING RE-EXECUTION@\n" Io_infer.Html.pp_hline () ; F.fprintf fmt "%aWARNINGS DURING RE-EXECUTION@\n" Io_infer.Html.pp_hline () ;
ErrLogHash.iter (pp_err_log false Exceptions.Kwarning) errlog ; ErrLogHash.iter (pp_err_log false Exceptions.Warning) errlog ;
F.fprintf fmt "%aINFOS DURING FOOTPRINT@\n" Io_infer.Html.pp_hline () ; F.fprintf fmt "%aINFOS DURING FOOTPRINT@\n" Io_infer.Html.pp_hline () ;
ErrLogHash.iter (pp_err_log true Exceptions.Kinfo) errlog ; ErrLogHash.iter (pp_err_log true Exceptions.Info) errlog ;
F.fprintf fmt "%aINFOS DURING RE-EXECUTION@\n" Io_infer.Html.pp_hline () ; F.fprintf fmt "%aINFOS DURING RE-EXECUTION@\n" Io_infer.Html.pp_hline () ;
ErrLogHash.iter (pp_err_log false Exceptions.Kinfo) errlog ErrLogHash.iter (pp_err_log false Exceptions.Info) errlog
(** Add an error description to the error log unless there is (** Add an error description to the error log unless there is
@ -290,7 +290,7 @@ let log_issue procname ?clang_method_kind severity err_log loc (node_id, node_ke
"@\n%a@\n@?" "@\n%a@\n@?"
(Exceptions.pp_err ~node_key loc severity error.name error.description error.ocaml_pos) (Exceptions.pp_err ~node_key loc severity error.name error.description error.ocaml_pos)
() ; () ;
if not (Exceptions.equal_severity severity Exceptions.Kerror) then ( if not (Exceptions.equal_severity severity Exceptions.Error) then (
let warn_str = let warn_str =
let pp fmt = let pp fmt =
Format.fprintf fmt "%s %a" error.name.IssueType.unique_id Localise.pp_error_desc Format.fprintf fmt "%s %a" error.name.IssueType.unique_id Localise.pp_error_desc
@ -300,11 +300,11 @@ let log_issue procname ?clang_method_kind severity err_log loc (node_id, node_ke
in in
let d = let d =
match severity with match severity with
| Exceptions.Kerror -> | Exceptions.Error ->
L.d_error L.d_error
| Exceptions.Kwarning -> | Exceptions.Warning ->
L.d_warning L.d_warning
| Exceptions.Kinfo | Exceptions.Kadvice | Exceptions.Klike -> | Exceptions.Info | Exceptions.Advice | Exceptions.Like ->
L.d_info L.d_info
in in
d warn_str ; L.d_ln () ) d warn_str ; L.d_ln () )

@ -29,7 +29,7 @@ type err_class = Checker | Prover | Nocat | Linters [@@deriving compare]
let equal_err_class = [%compare.equal : err_class] let equal_err_class = [%compare.equal : err_class]
(** severity of the report *) (** severity of the report *)
type severity = Kwarning | Kerror | Kinfo | Kadvice | Klike [@@deriving compare] type severity = Advice | Error | Info | Like | Warning [@@deriving compare]
let equal_severity = [%compare.equal : severity] let equal_severity = [%compare.equal : severity]
@ -178,7 +178,7 @@ let recognize_exception exn =
; description= desc ; description= desc
; ocaml_pos= Some ocaml_pos ; ocaml_pos= Some ocaml_pos
; visibility= Exn_developer ; visibility= Exn_developer
; severity= Some Kerror ; severity= Some Error
; category= Checker } ; category= Checker }
| Array_out_of_bounds_l2 (desc, ocaml_pos) -> | Array_out_of_bounds_l2 (desc, ocaml_pos) ->
{ name= IssueType.array_out_of_bounds_l2 { name= IssueType.array_out_of_bounds_l2
@ -257,7 +257,7 @@ let recognize_exception exn =
; description= desc ; description= desc
; ocaml_pos= None ; ocaml_pos= None
; visibility= Exn_developer ; visibility= Exn_developer
; severity= Some Kinfo ; severity= Some Info
; category= Checker } ; category= Checker }
| Dangling_pointer_dereference (dko, desc, ocaml_pos) -> | Dangling_pointer_dereference (dko, desc, ocaml_pos) ->
let visibility = let visibility =
@ -299,14 +299,14 @@ let recognize_exception exn =
; description= desc ; description= desc
; ocaml_pos= Some ocaml_pos ; ocaml_pos= Some ocaml_pos
; visibility= Exn_user ; visibility= Exn_user
; severity= Some Kerror ; severity= Some Error
; category= Checker } ; category= Checker }
| Double_lock (desc, ocaml_pos) -> | Double_lock (desc, ocaml_pos) ->
{ name= IssueType.double_lock { name= IssueType.double_lock
; description= desc ; description= desc
; ocaml_pos= Some ocaml_pos ; ocaml_pos= Some ocaml_pos
; visibility= Exn_user ; visibility= Exn_user
; severity= Some Kerror ; severity= Some Error
; category= Prover } ; category= Prover }
| Eradicate (kind, desc) -> | Eradicate (kind, desc) ->
{ name= kind { name= kind
@ -320,14 +320,14 @@ let recognize_exception exn =
; description= desc ; description= desc
; ocaml_pos= Some ocaml_pos ; ocaml_pos= Some ocaml_pos
; visibility= Exn_user ; visibility= Exn_user
; severity= Some Kerror ; severity= Some Error
; category= Prover } ; category= Prover }
| Field_not_null_checked (desc, ocaml_pos) -> | Field_not_null_checked (desc, ocaml_pos) ->
{ name= IssueType.field_not_null_checked { name= IssueType.field_not_null_checked
; description= desc ; description= desc
; ocaml_pos= Some ocaml_pos ; ocaml_pos= Some ocaml_pos
; visibility= Exn_user ; visibility= Exn_user
; severity= Some Kwarning ; severity= Some Warning
; category= Nocat } ; category= Nocat }
| Frontend_warning ((name, hum), desc, ocaml_pos) -> | Frontend_warning ((name, hum), desc, ocaml_pos) ->
{ name= IssueType.from_string name ?hum { name= IssueType.from_string name ?hum
@ -362,7 +362,7 @@ let recognize_exception exn =
; description= desc ; description= desc
; ocaml_pos= Some ocaml_pos ; ocaml_pos= Some ocaml_pos
; visibility= Exn_user ; visibility= Exn_user
; severity= Some Kerror ; severity= Some Error
; category= Checker } ; category= Checker }
| Inherently_dangerous_function desc -> | Inherently_dangerous_function desc ->
{ name= IssueType.inherently_dangerous_function { name= IssueType.inherently_dangerous_function
@ -439,7 +439,7 @@ let recognize_exception exn =
; description= desc ; description= desc
; ocaml_pos= Some ocaml_pos ; ocaml_pos= Some ocaml_pos
; visibility= Exn_user ; visibility= Exn_user
; severity= Some Kwarning ; severity= Some Warning
; category= Nocat } ; category= Nocat }
| Precondition_not_found (desc, ocaml_pos) -> | Precondition_not_found (desc, ocaml_pos) ->
{ name= IssueType.precondition_not_found { name= IssueType.precondition_not_found
@ -453,7 +453,7 @@ let recognize_exception exn =
; description= desc ; description= desc
; ocaml_pos= Some ocaml_pos ; ocaml_pos= Some ocaml_pos
; visibility= Exn_developer ; visibility= Exn_developer
; severity= Some Kwarning ; severity= Some Warning
; category= Nocat } ; category= Nocat }
(* always a warning *) (* always a warning *)
| Retain_cycle (desc, ocaml_pos) -> | Retain_cycle (desc, ocaml_pos) ->
@ -468,7 +468,7 @@ let recognize_exception exn =
; description= desc ; description= desc
; ocaml_pos= Some ocaml_pos ; ocaml_pos= Some ocaml_pos
; visibility= Exn_user ; visibility= Exn_user
; severity= Some Kerror ; severity= Some Error
; category= Nocat } ; category= Nocat }
| Return_expression_required (desc, ocaml_pos) -> | Return_expression_required (desc, ocaml_pos) ->
{ name= IssueType.return_expression_required { name= IssueType.return_expression_required
@ -482,7 +482,7 @@ let recognize_exception exn =
; description= desc ; description= desc
; ocaml_pos= Some ocaml_pos ; ocaml_pos= Some ocaml_pos
; visibility= Exn_user ; visibility= Exn_user
; severity= Some Kerror ; severity= Some Error
; category= Nocat } ; category= Nocat }
| Return_statement_missing (desc, ocaml_pos) -> | Return_statement_missing (desc, ocaml_pos) ->
{ name= IssueType.return_statement_missing { name= IssueType.return_statement_missing
@ -517,7 +517,7 @@ let recognize_exception exn =
; description= desc ; description= desc
; ocaml_pos= Some ocaml_pos ; ocaml_pos= Some ocaml_pos
; visibility= Exn_user ; visibility= Exn_user
; severity= Some Kinfo ; severity= Some Info
; category= Nocat } ; category= Nocat }
(* always an info *) (* always an info *)
| Symexec_memory_error ocaml_pos -> | Symexec_memory_error ocaml_pos ->
@ -596,16 +596,16 @@ let print_exception_html s exn =
(** string describing an error kind *) (** string describing an error kind *)
let severity_string = function let severity_string = function
| Kwarning -> | Advice ->
"WARNING" "ADVICE"
| Kerror -> | Error ->
"ERROR" "ERROR"
| Kinfo -> | Info ->
"INFO" "INFO"
| Kadvice -> | Like ->
"ADVICE"
| Klike ->
"LIKE" "LIKE"
| Warning ->
"WARNING"
(** string describing an error class *) (** string describing an error class *)
@ -625,7 +625,7 @@ let print_key = false
(** pretty print an error *) (** pretty print an error *)
let pp_err ~node_key loc severity ex_name desc ocaml_pos_opt fmt () = let pp_err ~node_key loc severity ex_name desc ocaml_pos_opt fmt () =
let kind = severity_string (if equal_severity severity Kinfo then Kwarning else severity) in let kind = severity_string (if equal_severity severity Info then Warning else severity) in
let pp_key fmt k = if print_key then F.fprintf fmt " key: %s " (Caml.Digest.to_hex k) else () in let pp_key fmt k = if print_key then F.fprintf fmt " key: %s " (Caml.Digest.to_hex k) else () in
F.fprintf fmt "%a:%d: %s: %a %a%a%a@\n" SourceFile.pp loc.Location.file loc.Location.line kind F.fprintf fmt "%a:%d: %s: %a %a%a%a@\n" SourceFile.pp loc.Location.file loc.Location.line kind
IssueType.pp ex_name Localise.pp_error_desc desc pp_key node_key L.pp_ocaml_pos_opt IssueType.pp ex_name Localise.pp_error_desc desc pp_key node_key L.pp_ocaml_pos_opt

@ -22,7 +22,7 @@ val equal_visibility : visibility -> visibility -> bool
val string_of_visibility : visibility -> string val string_of_visibility : visibility -> string
(** severity of the report *) (** severity of the report *)
type severity = Kwarning | Kerror | Kinfo | Kadvice | Klike [@@deriving compare] type severity = Advice | Error | Info | Like | Warning [@@deriving compare]
val equal_severity : severity -> severity -> bool val equal_severity : severity -> severity -> bool

@ -12,13 +12,13 @@ module L = Logging
module ST = struct module ST = struct
let report_error tenv proc_name proc_desc kind loc ?(field_name= None) ?(origin_loc= None) let report_error tenv proc_name proc_desc kind loc ?(field_name= None) ?(origin_loc= None)
?(exception_kind= fun k d -> Exceptions.Checkers (k, d)) ?(severity= Exceptions.Kwarning) ?(exception_kind= fun k d -> Exceptions.Checkers (k, d)) ?(severity= Exceptions.Warning)
description = description =
let log = let log =
match severity with match severity with
| Exceptions.Kwarning -> | Exceptions.Warning ->
Reporting.log_warning_deprecated Reporting.log_warning_deprecated
| Exceptions.Kerror -> | Exceptions.Error ->
Reporting.log_error_deprecated Reporting.log_error_deprecated
| _ -> | _ ->
L.(die InternalError) "Severity not supported" L.(die InternalError) "Severity not supported"

@ -65,7 +65,7 @@ let compute_hash (severity: string) (bug_type: string) (proc_name: Typ.Procname.
let loc_trace_to_jsonbug_record trace_list ekind = let loc_trace_to_jsonbug_record trace_list ekind =
match ekind with match ekind with
| Exceptions.Kinfo -> | Exceptions.Info ->
[] []
| _ -> | _ ->
let trace_item_to_record trace_item = let trace_item_to_record trace_item =
@ -125,7 +125,7 @@ let summary_values summary =
; verr= ; verr=
Errlog.size Errlog.size
(fun severity in_footprint -> (fun severity in_footprint ->
Exceptions.equal_severity severity Exceptions.Kerror && in_footprint ) Exceptions.equal_severity severity Exceptions.Error && in_footprint )
err_log err_log
; vflags= attributes.ProcAttributes.proc_flags ; vflags= attributes.ProcAttributes.proc_flags
; vfile= SourceFile.to_string attributes.ProcAttributes.loc.Location.file ; vfile= SourceFile.to_string attributes.ProcAttributes.loc.Location.file
@ -165,7 +165,7 @@ let should_report (issue_kind: Exceptions.severity) issue_type error_desc eclass
if not Config.filtering || Exceptions.equal_err_class eclass Exceptions.Linters then true if not Config.filtering || Exceptions.equal_err_class eclass Exceptions.Linters then true
else else
let issue_kind_is_blacklisted = let issue_kind_is_blacklisted =
match issue_kind with Kinfo -> true | Kerror | Kwarning | Kadvice | Klike -> false match issue_kind with Info -> true | Advice | Error | Like | Warning -> false
in in
if issue_kind_is_blacklisted then false if issue_kind_is_blacklisted then false
else else
@ -474,7 +474,7 @@ module Stats = struct
let type_str = key.err_name.IssueType.unique_id in let type_str = key.err_name.IssueType.unique_id in
if key.in_footprint && error_filter key.err_name then if key.in_footprint && error_filter key.err_name then
match key.severity with match key.severity with
| Exceptions.Kerror -> | Exceptions.Error ->
found_errors := true ; found_errors := true ;
stats.nerrors <- stats.nerrors + 1 ; stats.nerrors <- stats.nerrors + 1 ;
let error_strs = let error_strs =
@ -488,13 +488,13 @@ module Stats = struct
in in
let trace = loc_trace_to_string_list linereader 1 err_data.loc_trace in let trace = loc_trace_to_string_list linereader 1 err_data.loc_trace in
stats.saved_errors <- List.rev_append (error_strs @ trace @ [""]) stats.saved_errors stats.saved_errors <- List.rev_append (error_strs @ trace @ [""]) stats.saved_errors
| Exceptions.Kwarning -> | Exceptions.Warning ->
stats.nwarnings <- stats.nwarnings + 1 stats.nwarnings <- stats.nwarnings + 1
| Exceptions.Kinfo -> | Exceptions.Info ->
stats.ninfos <- stats.ninfos + 1 stats.ninfos <- stats.ninfos + 1
| Exceptions.Kadvice -> | Exceptions.Advice ->
stats.nadvice <- stats.nadvice + 1 stats.nadvice <- stats.nadvice + 1
| Exceptions.Klike -> | Exceptions.Like ->
stats.nlikes <- stats.nlikes + 1 stats.nlikes <- stats.nlikes + 1
in in
Errlog.iter process_row err_log ; !found_errors Errlog.iter process_row err_log ; !found_errors

@ -78,20 +78,20 @@ let log_issue_deprecated ?(store_summary= false) severity proc_name ?loc ?node_i
Typ.Procname.pp proc_name Typ.Procname.pp proc_name Typ.Procname.pp proc_name Typ.Procname.pp proc_name
let log_error = log_issue_from_summary Exceptions.Kerror let log_error = log_issue_from_summary Exceptions.Error
let log_warning = log_issue_from_summary Exceptions.Kwarning let log_warning = log_issue_from_summary Exceptions.Warning
let log_error_deprecated ?(store_summary= false) = let log_error_deprecated ?(store_summary= false) =
log_issue_deprecated ~store_summary Exceptions.Kerror log_issue_deprecated ~store_summary Exceptions.Error
let log_warning_deprecated ?(store_summary= false) = let log_warning_deprecated ?(store_summary= false) =
log_issue_deprecated ~store_summary Exceptions.Kwarning log_issue_deprecated ~store_summary Exceptions.Warning
let log_info_deprecated ?(store_summary= false) = let log_info_deprecated ?(store_summary= false) =
log_issue_deprecated ~store_summary Exceptions.Kinfo log_issue_deprecated ~store_summary Exceptions.Info
let log_issue_external procname ?clang_method_kind severity ?loc ?node_id ?session ?ltr let log_issue_external procname ?clang_method_kind severity ?loc ?node_id ?session ?ltr

@ -149,7 +149,7 @@ let mutable_local_vars_advice context an =
Some Some
{ CIssue.id= "MUTABLE_LOCAL_VARIABLE_IN_COMPONENT_FILE" { CIssue.id= "MUTABLE_LOCAL_VARIABLE_IN_COMPONENT_FILE"
; name= None ; name= None
; severity= Exceptions.Kadvice ; severity= Exceptions.Advice
; mode= CIssue.On ; mode= CIssue.On
; description= ; description=
"Local variable " ^ MF.monospaced_to_string named_decl_info.ni_name "Local variable " ^ MF.monospaced_to_string named_decl_info.ni_name
@ -186,7 +186,7 @@ let component_factory_function_advice context an =
Some Some
{ CIssue.id= "COMPONENT_FACTORY_FUNCTION" { CIssue.id= "COMPONENT_FACTORY_FUNCTION"
; name= None ; name= None
; severity= Exceptions.Kadvice ; severity= Exceptions.Advice
; mode= CIssue.Off ; mode= CIssue.Off
; description= "Break out composite components" ; description= "Break out composite components"
; suggestion= ; suggestion=
@ -240,7 +240,7 @@ let component_with_unconventional_superclass_advice context an =
Some Some
{ CIssue.id= "COMPONENT_WITH_UNCONVENTIONAL_SUPERCLASS" { CIssue.id= "COMPONENT_WITH_UNCONVENTIONAL_SUPERCLASS"
; name= None ; name= None
; severity= Exceptions.Kadvice ; severity= Exceptions.Advice
; mode= CIssue.On ; mode= CIssue.On
; description= "Never Subclass Components" ; description= "Never Subclass Components"
; suggestion= Some "Instead, create a new subclass of CKCompositeComponent." ; suggestion= Some "Instead, create a new subclass of CKCompositeComponent."
@ -300,7 +300,7 @@ let component_with_multiple_factory_methods_advice context an =
~f:(fun meth_decl -> ~f:(fun meth_decl ->
{ CIssue.id= "COMPONENT_WITH_MULTIPLE_FACTORY_METHODS" { CIssue.id= "COMPONENT_WITH_MULTIPLE_FACTORY_METHODS"
; name= None ; name= None
; severity= Exceptions.Kadvice ; severity= Exceptions.Advice
; mode= CIssue.On ; mode= CIssue.On
; description= "Avoid Overrides" ; description= "Avoid Overrides"
; suggestion= ; suggestion=
@ -382,7 +382,7 @@ let rec component_initializer_with_side_effects_advice_ (context: CLintersContex
Some Some
{ CIssue.id= "COMPONENT_INITIALIZER_WITH_SIDE_EFFECTS" { CIssue.id= "COMPONENT_INITIALIZER_WITH_SIDE_EFFECTS"
; name= None ; name= None
; severity= Exceptions.Kadvice ; severity= Exceptions.Advice
; mode= CIssue.On ; mode= CIssue.On
; description= "No Side-effects" ; description= "No Side-effects"
; suggestion= ; suggestion=
@ -420,7 +420,7 @@ let component_file_line_count_info (context: CLintersContext.context) dec =
~f:(fun i -> ~f:(fun i ->
{ CIssue.id= "COMPONENT_FILE_LINE_COUNT" { CIssue.id= "COMPONENT_FILE_LINE_COUNT"
; name= None ; name= None
; severity= Exceptions.Kinfo ; severity= Exceptions.Info
; mode= CIssue.Off ; mode= CIssue.Off
; description= "Line count analytics" ; description= "Line count analytics"
; suggestion= None ; suggestion= None
@ -471,7 +471,7 @@ let component_file_cyclomatic_complexity_info (context: CLintersContext.context)
Some Some
{ CIssue.id= "COMPONENT_FILE_CYCLOMATIC_COMPLEXITY" { CIssue.id= "COMPONENT_FILE_CYCLOMATIC_COMPLEXITY"
; name= None ; name= None
; severity= Exceptions.Kinfo ; severity= Exceptions.Info
; mode= CIssue.Off ; mode= CIssue.Off
; description= "Cyclomatic Complexity Incremental Marker" ; description= "Cyclomatic Complexity Incremental Marker"
; suggestion= None ; suggestion= None

@ -160,15 +160,15 @@ let remove_new_lines_and_whitespace message =
let string_to_severity = function let string_to_severity = function
| "WARNING" -> | "WARNING" ->
Exceptions.Kwarning Exceptions.Warning
| "ERROR" -> | "ERROR" ->
Exceptions.Kerror Exceptions.Error
| "INFO" -> | "INFO" ->
Exceptions.Kinfo Exceptions.Info
| "ADVICE" -> | "ADVICE" ->
Exceptions.Kadvice Exceptions.Advice
| "LIKE" -> | "LIKE" ->
Exceptions.Klike Exceptions.Like
| s -> | s ->
L.die InternalError "Severity %s does not exist" s L.die InternalError "Severity %s does not exist" s
@ -207,7 +207,7 @@ let create_parsed_linters linters_def_file checkers : linter list =
; description= "" ; description= ""
; suggestion= None ; suggestion= None
; loc= Location.dummy ; loc= Location.dummy
; severity= Exceptions.Kwarning ; severity= Exceptions.Warning
; doc_url= None ; doc_url= None
; mode= CIssue.On } ; mode= CIssue.On }
in in

@ -915,7 +915,7 @@ let is_contaminated access wobbly_paths =
let log_issue current_pname ~loc ~ltr ~access exn = let log_issue current_pname ~loc ~ltr ~access exn =
Reporting.log_issue_external current_pname Exceptions.Kerror ~loc ~ltr ~access exn Reporting.log_issue_external current_pname Exceptions.Error ~loc ~ltr ~access exn
let report_thread_safety_violation tenv pdesc ~make_description ~report_kind access thread let report_thread_safety_violation tenv pdesc ~make_description ~report_kind access thread

@ -226,7 +226,7 @@ end = struct
let log map = let log map =
let log_report issuetype loc {pname; ltr; message} = let log_report issuetype loc {pname; ltr; message} =
let exn = Exceptions.Checkers (issuetype, Localise.verbatim_desc message) in let exn = Exceptions.Checkers (issuetype, Localise.verbatim_desc message) in
Reporting.log_issue_external pname Exceptions.Kerror ~loc ~ltr exn Reporting.log_issue_external pname Exceptions.Error ~loc ~ltr exn
in in
let mk_deduped_report num_of_reports ({message} as report) = let mk_deduped_report num_of_reports ({message} as report) =
{ report with { report with

@ -213,7 +213,7 @@ let add_err find_canonical_duplicate err_instance instr_ref_opt loc =
module Severity = struct module Severity = struct
let get_severity ia = let get_severity ia =
if Annotations.ia_ends_with ia Annotations.generated_graphql then Some Exceptions.Kerror if Annotations.ia_ends_with ia Annotations.generated_graphql then Some Exceptions.Error
else None else None

Loading…
Cancel
Save