Summary: One source of non-determinism is racing on procedure summaries when reporting. In particular, the summary of a method may be computed and stored by one thread, but another may be trying to report on it (eg, in cluster checkers). One solution (at least until everything is in sqlite) is to have separate files just for the reports, a la linters. This diff improves the interface of LintIssues and generalises it ahead of using it in other analysers. Reviewed By: jeremydubreil Differential Revision: D7859973 fbshipit-source-id: 8672d3bmaster
parent
96c6ff718b
commit
9a2c494454
@ -0,0 +1,27 @@
|
|||||||
|
(*
|
||||||
|
* Copyright (c) 2016 - present Facebook, Inc.
|
||||||
|
* All rights reserved.
|
||||||
|
*
|
||||||
|
* This source code is licensed under the BSD style license found in the
|
||||||
|
* LICENSE file in the root directory of this source tree. An additional grant
|
||||||
|
* of patent rights can be found in the PATENTS file in the same directory.
|
||||||
|
*)
|
||||||
|
|
||||||
|
open! IStd
|
||||||
|
|
||||||
|
(** Module to store a map from procnames to error logs. Starts with an empty map. *)
|
||||||
|
|
||||||
|
val get_map : unit -> Errlog.t Typ.Procname.Map.t
|
||||||
|
|
||||||
|
val exist_issues : unit -> bool
|
||||||
|
|
||||||
|
val get_err_log : Typ.Procname.t -> Errlog.t
|
||||||
|
(** Get the error log for a given procname. If not present, then add the association from
|
||||||
|
procname to an empty error log and return the latter. *)
|
||||||
|
|
||||||
|
val store : DB.filename -> unit
|
||||||
|
(** Store map to a file *)
|
||||||
|
|
||||||
|
val load : string -> unit
|
||||||
|
(** Reset the issue map first, then walk the directory given as argument and merge all
|
||||||
|
maps stored in the found files into the current map. *)
|
@ -1,25 +0,0 @@
|
|||||||
(*
|
|
||||||
* Copyright (c) 2016 - present Facebook, Inc.
|
|
||||||
* All rights reserved.
|
|
||||||
*
|
|
||||||
* This source code is licensed under the BSD style license found in the
|
|
||||||
* LICENSE file in the root directory of this source tree. An additional grant
|
|
||||||
* of patent rights can be found in the PATENTS file in the same directory.
|
|
||||||
*)
|
|
||||||
|
|
||||||
open! IStd
|
|
||||||
|
|
||||||
(** Module to store a set of issues per procedure *)
|
|
||||||
|
|
||||||
val errLogMap : Errlog.t Typ.Procname.Map.t ref
|
|
||||||
|
|
||||||
val exists_issues : unit -> bool
|
|
||||||
|
|
||||||
val get_err_log : Typ.Procname.t -> Errlog.t
|
|
||||||
(** Save issues to a file *)
|
|
||||||
|
|
||||||
val store_issues : DB.filename -> Errlog.t Typ.Procname.Map.t -> unit
|
|
||||||
(** Load issues from the given file *)
|
|
||||||
|
|
||||||
val load_issues_to_errlog_map : string -> unit
|
|
||||||
(** Load all the lint issues in the given dir and update the issues map *)
|
|
Loading…
Reference in new issue