Skip to content

Commit

Permalink
[annotreach] Shorten message
Browse files Browse the repository at this point in the history
Summary: The error message contained the sink method twice, which made error reports long and redundant.

Reviewed By: ngorogiannis

Differential Revision: D55369773

fbshipit-source-id: f4be82d1896c1efd2bd878f92ba724a7ddc7364c
  • Loading branch information
hajduakos authored and facebook-github-bot committed Mar 26, 2024
1 parent 7b21d03 commit 0d6297b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions infer/src/checkers/annotationReachability.ml
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,10 @@ let report_annotation_stack ({InterproceduralAnalysis.proc_desc; err_log} as ana
let final_trace = List.rev (update_trace call_loc trace) in
let exp_pname_str = string_of_pname snk_pname in
let description =
Format.asprintf "Method %a annotated with %a calls %a where %a is annotated with %a"
MF.pp_monospaced
Format.asprintf "Method %a (annotated with %a) calls %a (annotated with %a)" MF.pp_monospaced
(Procname.to_simplified_string src_pname)
MF.pp_monospaced ("@" ^ src_annot) MF.pp_monospaced exp_pname_str MF.pp_monospaced
exp_pname_str MF.pp_monospaced ("@" ^ snk_annot)
("@" ^ snk_annot)
in
let issue_type =
if String.equal src_annot Annotations.performance_critical then
Expand Down

0 comments on commit 0d6297b

Please sign in to comment.