[nullsafe][EASY] Logs when we suppress reporting

Summary: This will help with debugging tricky issues

Reviewed By: ezgicicek

Differential Revision: D21328445

fbshipit-source-id: 6781fc39e
master
Mitya Lyubarskiy 5 years ago committed by Facebook GitHub Bot
parent 064b4786f1
commit d01ada643d

@ -43,8 +43,8 @@ let log_issue_from_summary severity proc_attributes err_log ~node ~session ~loc
Language.curr_language_is Java
&& Annotations.ia_is_suppress_lint proc_attributes.ProcAttributes.method_annotation.return
in
if should_suppress_lint || is_java_generated_method || is_java_external_package then ()
(* Skip the reporting *)
if should_suppress_lint || is_java_generated_method || is_java_external_package then
Logging.debug Analysis Medium "Reporting is suppressed!@\n" (* Skip the reporting *)
else log_issue_from_errlog severity err_log ~loc ~node ~session ~ltr ~access:None ~extras exn

@ -12,7 +12,8 @@ open! IStd
let report_error tenv proc_name proc_desc kind loc ?(field_name = None)
?(exception_kind = fun k d -> Exceptions.Checkers (k, d)) ~severity description =
let suppressed = Reporting.is_suppressed tenv proc_desc kind ~field_name in
if not suppressed then
if suppressed then Logging.debug Analysis Medium "Reporting is suppressed!@\n"
else
let localized_description = Localise.verbatim_desc description in
let exn = exception_kind kind localized_description in
let trace = [Errlog.make_trace_element 0 loc description []] in

Loading…
Cancel
Save