From eb20bdd7167d40503d6cd664f83a1e28106939c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?George=20Guimar=C3=A3es?= Date: Mon, 30 Oct 2023 13:48:47 -0300 Subject: [PATCH] Fix some typos (#13043) --- lib/elixir/lib/calendar/datetime.ex | 2 +- lib/elixir/lib/kernel.ex | 2 +- lib/elixir/lib/kernel/utils.ex | 2 +- lib/elixir/lib/macro.ex | 2 +- lib/elixir/src/elixir_errors.erl | 2 +- lib/elixir/src/elixir_expand.erl | 2 +- lib/elixir/test/elixir/module_test.exs | 2 +- lib/iex/test/iex/autocomplete_test.exs | 4 ++-- lib/mix/lib/mix.ex | 2 +- lib/mix/lib/mix/tasks/compile.ex | 2 +- 10 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/elixir/lib/calendar/datetime.ex b/lib/elixir/lib/calendar/datetime.ex index ce15683ac3..396f4984e5 100644 --- a/lib/elixir/lib/calendar/datetime.ex +++ b/lib/elixir/lib/calendar/datetime.ex @@ -90,7 +90,7 @@ defmodule DateTime do hour that does not exist. Then, when they move the clock back, there is a certain hour that will happen twice. So if you want to schedule a meeting when this shift back happens, you would need to - explicitly say which occurence of 2:30 AM you mean: the one in + explicitly say which occurrence of 2:30 AM you mean: the one in "Summer Time", which occurs before the shift, or the one in "Standard Time", which occurs after it. Applications that are date and time sensitive need to take these scenarios into account diff --git a/lib/elixir/lib/kernel.ex b/lib/elixir/lib/kernel.ex index 52983d9b45..0ca281d3e5 100644 --- a/lib/elixir/lib/kernel.ex +++ b/lib/elixir/lib/kernel.ex @@ -6060,7 +6060,7 @@ defmodule Kernel do iex> ~S(\o/) "\\o/" - However, if you want to re-use the sigil character itself on + However, if you want to reuse the sigil character itself on the string, you need to escape it: iex> ~S((\)) diff --git a/lib/elixir/lib/kernel/utils.ex b/lib/elixir/lib/kernel/utils.ex index 23235f1170..8af029279e 100644 --- a/lib/elixir/lib/kernel/utils.ex +++ b/lib/elixir/lib/kernel/utils.ex @@ -289,7 +289,7 @@ defmodule Kernel.Utils do macro. Secondly, if the expression is being used outside of a guard, we want to unquote - `value`, but only once, and then re-use the unquoted form throughout the expression. + `value`, but only once, and then reuse the unquoted form throughout the expression. This helper does exactly that: takes the AST for an expression and a list of variable references it should be aware of, and rewrites it into a new expression diff --git a/lib/elixir/lib/macro.ex b/lib/elixir/lib/macro.ex index 5d3ab5bc55..c2dda7fa3c 100644 --- a/lib/elixir/lib/macro.ex +++ b/lib/elixir/lib/macro.ex @@ -1709,7 +1709,7 @@ defmodule Macro do @doc """ Applies a `mod`, `function`, and `args` at compile-time in `caller`. - This is used when you want to programatically invoke a macro at + This is used when you want to programmatically invoke a macro at compile-time. """ @doc since: "1.16.0" diff --git a/lib/elixir/src/elixir_errors.erl b/lib/elixir/src/elixir_errors.erl index a7969afb1d..1cb3d92bed 100644 --- a/lib/elixir/src/elixir_errors.erl +++ b/lib/elixir/src/elixir_errors.erl @@ -133,7 +133,7 @@ extract_column({_, C}) -> C; extract_column(_) -> nil. %% Format snippets -%% "Snippet" here refers to the source code line where the diagnostic/error occured +%% "Snippet" here refers to the source code line where the diagnostic/error occurred format_snippet(_Position, nil, Message, nil, Severity, _Stacktrace, _Span) -> Formatted = [prefix(Severity), " ", Message], diff --git a/lib/elixir/src/elixir_expand.erl b/lib/elixir/src/elixir_expand.erl index de71ccf377..c6399ee613 100644 --- a/lib/elixir/src/elixir_expand.erl +++ b/lib/elixir/src/elixir_expand.erl @@ -1336,7 +1336,7 @@ format_error({undefined_function, Name, Args}) -> io_lib:format("undefined function ~ts/~B (there is no such import)", [Name, length(Args)]); format_error({unpinned_bitsize_var, Name, Kind}) -> io_lib:format("the variable \"~ts\"~ts is accessed inside size(...) of a bitstring " - "but it was defined outside of the match. You must preceed it with the " + "but it was defined outside of the match. You must precede it with the " "pin operator", [Name, context_info(Kind)]); format_error({underscored_var_repeat, Name, Kind}) -> io_lib:format("the underscored variable \"~ts\"~ts appears more than once in a " diff --git a/lib/elixir/test/elixir/module_test.exs b/lib/elixir/test/elixir/module_test.exs index 1c0f31e608..42ab7e2506 100644 --- a/lib/elixir/test/elixir/module_test.exs +++ b/lib/elixir/test/elixir/module_test.exs @@ -567,7 +567,7 @@ defmodule ModuleTest do end describe "get_attribute/3" do - test "returns a list when the attribute is marked as `accummulate: true`" do + test "returns a list when the attribute is marked as `accumulate: true`" do in_module do Module.register_attribute(__MODULE__, :value, accumulate: true) Module.put_attribute(__MODULE__, :value, 1) diff --git a/lib/iex/test/iex/autocomplete_test.exs b/lib/iex/test/iex/autocomplete_test.exs index b3ef186bde..2720a43327 100644 --- a/lib/iex/test/iex/autocomplete_test.exs +++ b/lib/iex/test/iex/autocomplete_test.exs @@ -415,7 +415,7 @@ defmodule IEx.AutocompleteTest do assert {:yes, ~c"ry: ", []} = expand(~c"%URI{path: \"foo\", que") assert {:no, [], []} = expand(~c"%URI{path: \"foo\", unkno") - assert {:no, [], []} = expand(~c"%Unkown{path: \"foo\", unkno") + assert {:no, [], []} = expand(~c"%Unknown{path: \"foo\", unkno") end test "completion for struct keys in update syntax" do @@ -429,7 +429,7 @@ defmodule IEx.AutocompleteTest do assert {:yes, ~c"ry: ", []} = expand(~c"%URI{var | path: \"foo\", que") assert {:no, [], []} = expand(~c"%URI{var | path: \"foo\", unkno") - assert {:no, [], []} = expand(~c"%Unkown{var | path: \"foo\", unkno") + assert {:no, [], []} = expand(~c"%Unknown{var | path: \"foo\", unkno") end test "completion for map keys in update syntax" do diff --git a/lib/mix/lib/mix.ex b/lib/mix/lib/mix.ex index bf17b11565..576cfb5320 100644 --- a/lib/mix/lib/mix.ex +++ b/lib/mix/lib/mix.ex @@ -297,7 +297,7 @@ defmodule Mix do are several tasks depending on `mix compile`, the code will be compiled only once. - Similary, `mix format` can only be invoked once. So if you have an alias + Similarly, `mix format` can only be invoked once. So if you have an alias that attempts to invoke `mix format` multiple times, it won't work unless it is explicitly reenabled using `Mix.Task.reenable/1`: diff --git a/lib/mix/lib/mix/tasks/compile.ex b/lib/mix/lib/mix/tasks/compile.ex index ed55c7b246..c7f90c45ec 100644 --- a/lib/mix/lib/mix/tasks/compile.ex +++ b/lib/mix/lib/mix/tasks/compile.ex @@ -40,7 +40,7 @@ defmodule Mix.Tasks.Compile do in the project file with dependencies. When false, this keeps the entirety of Erlang/OTP available when the project starts, including the paths set by the code loader from the `ERL_LIBS` environment as - well as explicitely listed by providing `-pa` and `-pz` options + well as explicitly listed by providing `-pa` and `-pz` options to Erlang. ## Compilers