Skip to content

Commit

Permalink
fix several typos about redundant words (facebook#1691)
Browse files Browse the repository at this point in the history
Summary:
This PR fixes several typos about redundant words like `an an` and `the the` in documents or annotations.

Pull Request resolved: facebook#1691

Reviewed By: ngorogiannis

Differential Revision: D40298278

Pulled By: jvillard

fbshipit-source-id: bac74d0b9910675e3800e9d81e5520321cea9c78
  • Loading branch information
x2018 authored and facebook-github-bot committed Oct 13, 2022
1 parent aaa1dfa commit 52a5183
Show file tree
Hide file tree
Showing 28 changed files with 36 additions and 36 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ module MF = MarkupFormatter
`f`. For instance: `List.map : 'a list -> f:('a -> 'b) -> 'b list`.

- In modules defining a type `t`, functions that take an argument of that type should generally have
that argument come first, except for for optional arguments: `val f : ?optional:bool -> t -> ...`.
that argument come first, except for optional arguments: `val f : ?optional:bool -> t -> ...`.

- Use the `_hum` suffix to flag functions that output human-readable strings.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ class C {

Action: The preferred action is to ensure that a null value is never returned by
the method, by changing the code or changing annotations. If this cannot be
done, add a @Nullable annotation to the the method declaration. This annotation
done, add a @Nullable annotation to the method declaration. This annotation
might trigger more warnings in the callers of method m, as the callers must now
deal with null values.
2 changes: 1 addition & 1 deletion infer/documentation/issues/RESOURCE_LEAK.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ NullPointerException.
### Nested_Allocations

When a resource allocation is included as an argument to a constructor, if the
constructor fails it can leave an an unreachable resource that no one can close.
constructor fails it can leave an unreachable resource that no one can close.

For example gzipOutputStream = new GZIPOutputStream(new FileOutputStream(out));
is bad in case the outer constructor, GZIPOutputStream, throws an exception. In
Expand Down
12 changes: 6 additions & 6 deletions infer/src/absint/AccessTree.mli
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ module type S = sig
(** retrieve the trace associated with the given access path *)

val add_node : AccessPath.Abs.t -> node -> t -> t
(** add the given access path to the tree and associate its last access with with the given node.
if any of the accesses in the path are not already present in the tree, they will be added
with with empty traces associated with each of the inner nodes. *)
(** add the given access path to the tree and associate its last access with the given node. if
any of the accesses in the path are not already present in the tree, they will be added with
empty traces associated with each of the inner nodes. *)

val add_trace : AccessPath.Abs.t -> TraceDomain.t -> t -> t
(** add the given access path to the tree and associate its last access with with the given trace.
if any of the accesses in the path are not already present in the tree, they will be added
with with empty traces associated with each of the inner nodes. *)
(** add the given access path to the tree and associate its last access with the given trace. if
any of the accesses in the path are not already present in the tree, they will be added with
empty traces associated with each of the inner nodes. *)

val node_join : node -> node -> node
(** join two nodes *)
Expand Down
2 changes: 1 addition & 1 deletion infer/src/absint/DataFlow.ml
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ end

(* MakeDF *)

(** Example dataflow analysis: compute the the distance from a node to the start node. *)
(** Example dataflow analysis: compute the distance from a node to the start node. *)
let _test_dataflow proc_desc =
let verbose = false in
let module DFCount = MakeDF (struct
Expand Down
2 changes: 1 addition & 1 deletion infer/src/biabduction/Attribute.ml
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ let deallocate_stack_vars tenv (p : 'a Prop.t) pvars =
let do_var (v, freshv) =
(* static locals are not stack-allocated *)
if not (Pvar.is_static_local v) then
(* the address of a de-allocated stack var in in the post *)
(* the address of a de-allocated stack var is in the post *)
if Ident.Set.mem freshv p'_fav then (
stack_vars_address_in_post := v :: !stack_vars_address_in_post ;
let pred = Predicates.Apred (Adangling DAaddr_stack_var, [Exp.Var freshv]) in
Expand Down
2 changes: 1 addition & 1 deletion infer/src/nullsafe/typeErr.ml
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ let make_nullsafe_issue_if_reportable ~nullsafe_mode err_instance =


let is_reportable ~nullsafe_mode err_instance =
(* Note: we don't fetch the whole info because the the class-level analysis breaks some
(* Note: we don't fetch the whole info because the class-level analysis breaks some
assumptions of this function, and also for optimization purposes (saving some string
manipulations). *)
make_nullsafe_issue_if_reportable_lazy ~nullsafe_mode err_instance |> Option.is_some
Expand Down
2 changes: 1 addition & 1 deletion website/docs/04-absint-framework.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ it's trying to do, it's a fairly good place to look in order to understand both
how to use the abstract interpretation framework and what SIL is.

There are basically three important bits here: defining the domain, defining the
transfer functions, and then passing the pieces to the framework to create an an
transfer functions, and then passing the pieces to the framework to create an
analysis. Let's break down the third bit:

```OCaml
Expand Down
4 changes: 2 additions & 2 deletions website/docs/all-issue-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -1034,7 +1034,7 @@ class C {

Action: The preferred action is to ensure that a null value is never returned by
the method, by changing the code or changing annotations. If this cannot be
done, add a @Nullable annotation to the the method declaration. This annotation
done, add a @Nullable annotation to the method declaration. This annotation
might trigger more warnings in the callers of method m, as the callers must now
deal with null values.

Expand Down Expand Up @@ -2434,7 +2434,7 @@ NullPointerException.
### Nested_Allocations

When a resource allocation is included as an argument to a constructor, if the
constructor fails it can leave an an unreachable resource that no one can close.
constructor fails it can leave an unreachable resource that no one can close.

For example gzipOutputStream = new GZIPOutputStream(new FileOutputStream(out));
is bad in case the outer constructor, GZIPOutputStream, throws an exception. In
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<span><a href="argument-1-TraceDomain/index.html#type-t">TraceDomain.t</a> <span class="arrow">&#45;&gt;</span></span>
<span><a href="../../AccessPath/index.html#type-access">AccessPath.access</a> <span class="arrow">&#45;&gt;</span></span>
<span><a href="argument-1-TraceDomain/index.html#type-t">TraceDomain.t</a> <span class="arrow">&#45;&gt;</span></span>
<a href="#type-node">node</a></span></code></div><div class="spec-doc"><p>for testing only</p></div></div><div class="odoc-spec"><div class="spec value" id="val-make_normal_leaf" class="anchored"><a href="#val-make_normal_leaf" class="anchor"></a><code><span><span class="keyword">val</span> make_normal_leaf : <span><a href="argument-1-TraceDomain/index.html#type-t">TraceDomain.t</a> <span class="arrow">&#45;&gt;</span></span> <a href="#type-node">node</a></span></code></div><div class="spec-doc"><p>create a leaf node with no successors</p></div></div><div class="odoc-spec"><div class="spec value" id="val-make_starred_leaf" class="anchored"><a href="#val-make_starred_leaf" class="anchor"></a><code><span><span class="keyword">val</span> make_starred_leaf : <span><a href="argument-1-TraceDomain/index.html#type-t">TraceDomain.t</a> <span class="arrow">&#45;&gt;</span></span> <a href="#type-node">node</a></span></code></div><div class="spec-doc"><p>create a leaf node with a wildcard successor</p></div></div><div class="odoc-spec"><div class="spec value" id="val-get_node" class="anchored"><a href="#val-get_node" class="anchor"></a><code><span><span class="keyword">val</span> get_node : <span><a href="../../AccessPath/Abs/index.html#type-t">AccessPath.Abs.t</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="#type-node">node</a> option</span></span></code></div><div class="spec-doc"><p>retrieve the node associated with the given access path</p></div></div><div class="odoc-spec"><div class="spec value" id="val-get_trace" class="anchored"><a href="#val-get_trace" class="anchor"></a><code><span><span class="keyword">val</span> get_trace : <span><a href="../../AccessPath/Abs/index.html#type-t">AccessPath.Abs.t</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="argument-1-TraceDomain/index.html#type-t">TraceDomain.t</a> option</span></span></code></div><div class="spec-doc"><p>retrieve the trace associated with the given access path</p></div></div><div class="odoc-spec"><div class="spec value" id="val-add_node" class="anchored"><a href="#val-add_node" class="anchor"></a><code><span><span class="keyword">val</span> add_node : <span><a href="../../AccessPath/Abs/index.html#type-t">AccessPath.Abs.t</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="#type-node">node</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <a href="#type-t">t</a></span></code></div><div class="spec-doc"><p>add the given access path to the tree and associate its last access with with the given node. if any of the accesses in the path are not already present in the tree, they will be added with with empty traces associated with each of the inner nodes.</p></div></div><div class="odoc-spec"><div class="spec value" id="val-add_trace" class="anchored"><a href="#val-add_trace" class="anchor"></a><code><span><span class="keyword">val</span> add_trace : <span><a href="../../AccessPath/Abs/index.html#type-t">AccessPath.Abs.t</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="argument-1-TraceDomain/index.html#type-t">TraceDomain.t</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <a href="#type-t">t</a></span></code></div><div class="spec-doc"><p>add the given access path to the tree and associate its last access with with the given trace. if any of the accesses in the path are not already present in the tree, they will be added with with empty traces associated with each of the inner nodes.</p></div></div><div class="odoc-spec"><div class="spec value" id="val-node_join" class="anchored"><a href="#val-node_join" class="anchor"></a><code><span><span class="keyword">val</span> node_join : <span><a href="#type-node">node</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="#type-node">node</a> <span class="arrow">&#45;&gt;</span></span> <a href="#type-node">node</a></span></code></div><div class="spec-doc"><p>join two nodes</p></div></div><div class="odoc-spec"><div class="spec value" id="val-fold" class="anchored"><a href="#val-fold" class="anchor"></a><code><span><span class="keyword">val</span> fold : <span><span>( <span><span class="type-var">'a</span> <span class="arrow">&#45;&gt;</span></span> <span><a href="../../AccessPath/Abs/index.html#type-t">AccessPath.Abs.t</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="#type-node">node</a> <span class="arrow">&#45;&gt;</span></span> <span class="type-var">'a</span> )</span> <span class="arrow">&#45;&gt;</span></span> <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span><span class="type-var">'a</span> <span class="arrow">&#45;&gt;</span></span> <span class="type-var">'a</span></span></code></div><div class="spec-doc"><p>apply a function to each (access path, node) pair in the tree.</p></div></div><div class="odoc-spec"><div class="spec value" id="val-trace_fold" class="anchored"><a href="#val-trace_fold" class="anchor"></a><code><span><span class="keyword">val</span> trace_fold :
<a href="#type-node">node</a></span></code></div><div class="spec-doc"><p>for testing only</p></div></div><div class="odoc-spec"><div class="spec value" id="val-make_normal_leaf" class="anchored"><a href="#val-make_normal_leaf" class="anchor"></a><code><span><span class="keyword">val</span> make_normal_leaf : <span><a href="argument-1-TraceDomain/index.html#type-t">TraceDomain.t</a> <span class="arrow">&#45;&gt;</span></span> <a href="#type-node">node</a></span></code></div><div class="spec-doc"><p>create a leaf node with no successors</p></div></div><div class="odoc-spec"><div class="spec value" id="val-make_starred_leaf" class="anchored"><a href="#val-make_starred_leaf" class="anchor"></a><code><span><span class="keyword">val</span> make_starred_leaf : <span><a href="argument-1-TraceDomain/index.html#type-t">TraceDomain.t</a> <span class="arrow">&#45;&gt;</span></span> <a href="#type-node">node</a></span></code></div><div class="spec-doc"><p>create a leaf node with a wildcard successor</p></div></div><div class="odoc-spec"><div class="spec value" id="val-get_node" class="anchored"><a href="#val-get_node" class="anchor"></a><code><span><span class="keyword">val</span> get_node : <span><a href="../../AccessPath/Abs/index.html#type-t">AccessPath.Abs.t</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="#type-node">node</a> option</span></span></code></div><div class="spec-doc"><p>retrieve the node associated with the given access path</p></div></div><div class="odoc-spec"><div class="spec value" id="val-get_trace" class="anchored"><a href="#val-get_trace" class="anchor"></a><code><span><span class="keyword">val</span> get_trace : <span><a href="../../AccessPath/Abs/index.html#type-t">AccessPath.Abs.t</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="argument-1-TraceDomain/index.html#type-t">TraceDomain.t</a> option</span></span></code></div><div class="spec-doc"><p>retrieve the trace associated with the given access path</p></div></div><div class="odoc-spec"><div class="spec value" id="val-add_node" class="anchored"><a href="#val-add_node" class="anchor"></a><code><span><span class="keyword">val</span> add_node : <span><a href="../../AccessPath/Abs/index.html#type-t">AccessPath.Abs.t</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="#type-node">node</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <a href="#type-t">t</a></span></code></div><div class="spec-doc"><p>add the given access path to the tree and associate its last access with the given node. if any of the accesses in the path are not already present in the tree, they will be added with empty traces associated with each of the inner nodes.</p></div></div><div class="odoc-spec"><div class="spec value" id="val-add_trace" class="anchored"><a href="#val-add_trace" class="anchor"></a><code><span><span class="keyword">val</span> add_trace : <span><a href="../../AccessPath/Abs/index.html#type-t">AccessPath.Abs.t</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="argument-1-TraceDomain/index.html#type-t">TraceDomain.t</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <a href="#type-t">t</a></span></code></div><div class="spec-doc"><p>add the given access path to the tree and associate its last access with the given trace. if any of the accesses in the path are not already present in the tree, they will be added with empty traces associated with each of the inner nodes.</p></div></div><div class="odoc-spec"><div class="spec value" id="val-node_join" class="anchored"><a href="#val-node_join" class="anchor"></a><code><span><span class="keyword">val</span> node_join : <span><a href="#type-node">node</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="#type-node">node</a> <span class="arrow">&#45;&gt;</span></span> <a href="#type-node">node</a></span></code></div><div class="spec-doc"><p>join two nodes</p></div></div><div class="odoc-spec"><div class="spec value" id="val-fold" class="anchored"><a href="#val-fold" class="anchor"></a><code><span><span class="keyword">val</span> fold : <span><span>( <span><span class="type-var">'a</span> <span class="arrow">&#45;&gt;</span></span> <span><a href="../../AccessPath/Abs/index.html#type-t">AccessPath.Abs.t</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="#type-node">node</a> <span class="arrow">&#45;&gt;</span></span> <span class="type-var">'a</span> )</span> <span class="arrow">&#45;&gt;</span></span> <span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span> <span><span class="type-var">'a</span> <span class="arrow">&#45;&gt;</span></span> <span class="type-var">'a</span></span></code></div><div class="spec-doc"><p>apply a function to each (access path, node) pair in the tree.</p></div></div><div class="odoc-spec"><div class="spec value" id="val-trace_fold" class="anchored"><a href="#val-trace_fold" class="anchor"></a><code><span><span class="keyword">val</span> trace_fold :
<span><span>( <span><span class="type-var">'a</span> <span class="arrow">&#45;&gt;</span></span> <span><a href="../../AccessPath/Abs/index.html#type-t">AccessPath.Abs.t</a> <span class="arrow">&#45;&gt;</span></span> <span><a href="argument-1-TraceDomain/index.html#type-t">TraceDomain.t</a> <span class="arrow">&#45;&gt;</span></span> <span class="type-var">'a</span> )</span> <span class="arrow">&#45;&gt;</span></span>
<span><a href="#type-t">t</a> <span class="arrow">&#45;&gt;</span></span>
<span><span class="type-var">'a</span> <span class="arrow">&#45;&gt;</span></span>
Expand Down
Loading

0 comments on commit 52a5183

Please sign in to comment.