Skip to content

Commit 7b2fa91

Browse files
committed
Use Title Case and backticks for Erlang and Elixir applications
It includes Erlang, Elixir, ExUnit, ExDoc, Logger, IEx, elixirc It leaves Mix for a different PR. Command to spot these words: ag -s '(?<!(\`))(?<!(\.))(?<!(/))(?<!(:))(?<!(_))(erlang|elixir|eex|iex|ex_unit|ex_doc|logger|elixirc)(?!(:))(?!(\?))(?!(_))(?!(-))(?!(\.))(?!(\`))(?!(/))(?!(>))' \ --ignore "*.erl" --ignore "*.yrl" --ignore "*.src"
1 parent 7dd1c9d commit 7b2fa91

File tree

21 files changed

+41
-41
lines changed

21 files changed

+41
-41
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ and is using Erlang 17.1, remember to update to at least Erlang 17.3.
104104
#### Logger
105105

106106
* [Logger] Support printing pids and refs in Logger metadata
107-
* [Logger] Allow logger metadata to be removed from pdict by setting it to `nil`
107+
* [Logger] Allow Logger metadata to be removed from pdict by setting it to `nil`
108108
* [Logger] Add application configuration `translator_inspect_opts` for logger to customize how state and message are formatted when translating OTP errors and reports
109109
* [Logger] Automatically include the current application in metadata when compiled via Mix
110110

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,6 @@ you are looking for some examples:
267267

268268
* [Implement Enum.member?Pull Request](https://github.com/elixir-lang/elixir/pull/992)
269269
* [Add String.valid?Pull Request](https://github.com/elixir-lang/elixir/pull/1058)
270-
* [Implement capture_io for ex_unitPull Request](https://github.com/elixir-lang/elixir/pull/1059)
270+
* [Implement capture_io for ExUnitPull Request](https://github.com/elixir-lang/elixir/pull/1059)
271271

272272
Thank you for your contributions!

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ If you have the correct version and tests still fail, feel free to [open an issu
2828

2929
## Building documentation
3030

31-
Building the documentation requires [ex_doc](https://github.com/elixir-lang/ex_doc) to be installed and built in the same containing folder as elixir.
31+
Building the documentation requires [ExDoc](https://github.com/elixir-lang/ex_doc) to be installed and built in the same containing folder as elixir.
3232

3333
```sh
3434
# After cloning and compiling Elixir

bin/elixir

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ if [ $# -eq 0 ] || [ "$1" = "--help" ] || [ "$1" = "-h" ]; then
1010
-pa \"path\" Prepends the given path to Erlang code path (*)
1111
-pz \"path\" Appends the given path to Erlang code path (*)
1212
--app \"app\" Start the given app and its dependencies (*)
13-
--erl \"switches\" Switches to be passed down to erlang (*)
13+
--erl \"switches\" Switches to be passed down to Erlang (*)
1414
--name \"name\" Makes and assigns a name to the distributed node
1515
--sname \"name\" Makes and assigns a short name to the distributed node
1616
--cookie \"cookie\" Sets a cookie for this distributed node
@@ -21,7 +21,7 @@ if [ $# -eq 0 ] || [ "$1" = "--help" ] || [ "$1" = "-h" ]; then
2121
2222
** Options marked with (*) can be given more than once
2323
** Options given after the .exs file or -- are passed down to the executed code
24-
** Options can be passed to the erlang runtime using ELIXIR_ERL_OPTIONS or --erl" >&2
24+
** Options can be passed to the Erlang runtime using ELIXIR_ERL_OPTIONS or --erl" >&2
2525
exit 1
2626
fi
2727

bin/elixirc.bat

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ echo --warnings-as-errors Treat warnings as errors and return non-zero exit cod
2020
echo --verbose Print informational messages.
2121
echo.
2222
echo ** Options given after -- are passed down to the executed code
23-
echo ** Options can be passed to the erlang runtime using ELIXIR_ERL_OPTIONS
24-
echo ** Options can be passed to the erlang compiler using ERL_COMPILER_OPTIONS >&2
23+
echo ** Options can be passed to the Erlang runtime using ELIXIR_ERL_OPTIONS
24+
echo ** Options can be passed to the Erlang compiler using ERL_COMPILER_OPTIONS >&2
2525
:run
2626
call "%~dp0\elixir.bat" +elixirc %*

bin/iex

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ if [ $# -gt 0 ] && ([ "$1" = "--help" ] || [ "$1" = "-h" ]); then
1010
-pa \"path\" Prepends the given path to Erlang code path (*)
1111
-pz \"path\" Appends the given path to Erlang code path (*)
1212
--app \"app\" Start the given app and its dependencies (*)
13-
--erl \"switches\" Switches to be passed down to erlang (*)
13+
--erl \"switches\" Switches to be passed down to Erlang (*)
1414
--name \"name\" Makes and assigns a name to the distributed node
1515
--sname \"name\" Makes and assigns a short name to the distributed node
1616
--cookie \"cookie\" Sets a cookie for this distributed node

lib/elixir/lib/kernel/cli.ex

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ defmodule Kernel.CLI do
3737
if ok_or_shutdown == :shutdown or halt do
3838
{_, status} = at_exit({ok_or_shutdown, status})
3939

40-
# Ensure logger messages are flushed before halting
40+
# Ensure Logger messages are flushed before halting
4141
case :erlang.whereis(Logger) do
4242
pid when is_pid(pid) -> Logger.flush()
4343
_ -> :ok

lib/elixir/lib/system.ex

+1-1
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ defmodule System do
325325
* If `:abort`, the runtime system aborts producing a core dump, if that is
326326
enabled in the operating system.
327327
328-
* If a string, an erlang crash dump is produced with status as slogan,
328+
* If a string, an Erlang crash dump is produced with status as slogan,
329329
and then the runtime system exits with status code 1.
330330
331331
Note that on many platforms, only the status codes 0-255 are supported

lib/elixir/test/elixir/file_test.exs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ defmodule FileTest do
2222
import Regex, only: [escape: 1]
2323

2424
defmodule Rename do
25-
# Following erlang's underlying implementation
25+
# Following Erlang's underlying implementation
2626
#
2727
# Renaming files
2828
# :ok -> rename file to existing file default behaviour

lib/ex_unit/lib/ex_unit/doc_test.ex

+6-6
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ defmodule ExUnit.DocTest do
7171
example above) or when the result is a complicated data structure and you
7272
don't want to show it all, but just parts of it or some of its properties.
7373
74-
Similarly to iex you can use numbers in your "prompts":
74+
Similarly to IEx you can use numbers in your "prompts":
7575
7676
iex(1)> [1 + 2,
7777
...(1)> 3]
@@ -80,7 +80,7 @@ defmodule ExUnit.DocTest do
8080
This is useful in two use cases:
8181
8282
* being able to refer to specific numbered scenarios
83-
* copy-pasting examples from an actual iex session
83+
* copy-pasting examples from an actual IEx session
8484
8585
We also allow you to select or skip some functions when calling
8686
`doctest`. See the documentation for more info.
@@ -97,7 +97,7 @@ defmodule ExUnit.DocTest do
9797
9898
%{users: #HashSet<[:foo, :bar]>}
9999
100-
If you try to match on such expression, doctest will fail to compile.
100+
If you try to match on such expression, `doctest` will fail to compile.
101101
You have two options to solve this.
102102
103103
The first one is to rely on the fact that doctest can compare internal
@@ -107,7 +107,7 @@ defmodule ExUnit.DocTest do
107107
iex> map.users
108108
#HashSet<[:foo, :bar]>
109109
110-
Whenever a doctest starts with "#Name<", doctest will perform a string
110+
Whenever a doctest starts with "#Name<", `doctest` will perform a string
111111
comparison. For example, the above test will perform the following match:
112112
113113
inspect(map.users) == "#HashSet<[:foo, :bar]>"
@@ -135,10 +135,10 @@ defmodule ExUnit.DocTest do
135135
or a no-op line with documentation. Thus, multiline messages are not
136136
supported.
137137
138-
## When not to use doctest
138+
## When not to use `doctest`
139139
140140
In general, doctests are not recommended when your code examples contain
141-
side effects. For example, if a doctest prints to standard output, doctest
141+
side effects. For example, if a doctest prints to standard output, `doctest`
142142
will not try to capture the output.
143143
144144
Similarly, doctests do not run in any kind of sandbox. So any module

lib/iex/lib/iex.ex

+3-3
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,9 @@ defmodule IEx do
113113
114114
Where "remsh" means "remote shell". In general, Elixir supports:
115115
116-
* remsh from an elixir node to an elixir node
117-
* remsh from a plain erlang node to an elixir node (through the ^G menu)
118-
* remsh from an elixir node to a plain erlang node (and get an erl shell there)
116+
* remsh from an Elixir node to an Elixir node
117+
* remsh from a plain Erlang node to an Elixir node (through the ^G menu)
118+
* remsh from an Elixir node to a plain Erlang node (and get an `erl` shell there)
119119
120120
Connecting an Elixir shell to a remote node without Elixir is
121121
**not** supported.

lib/iex/lib/iex/cli.ex

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# bug has arisen;
1616
#
1717
# 2. In some situations, connecting to a remote node via --remsh
18-
# is not possible. This can be tested by starting two iex nodes:
18+
# is not possible. This can be tested by starting two IEx nodes:
1919
#
2020
# $ iex --sname foo
2121
# $ iex --sname bar --remsh foo@localhost

lib/iex/lib/iex/helpers.ex

+1-1
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,7 @@ defmodule IEx.Helpers do
516516
raise ArgumentError, "import_file/1 expects a literal binary as its argument"
517517
end
518518

519-
# Compiles and loads an erlang source file, returns {module, binary}
519+
# Compiles and loads an Erlang source file, returns {module, binary}
520520
defp compile_erlang(source) do
521521
source = Path.relative_to_cwd(source) |> String.to_char_list
522522
case :compile.file(source, [:binary, :report]) do

lib/logger/lib/logger.ex

+10-10
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ defmodule Logger do
1010
supervised when plugged into Logger.
1111
1212
* Formats and truncates messages on the client
13-
to avoid clogging logger backends.
13+
to avoid clogging Logger backends.
1414
1515
* Alternates between sync and async modes to remain
1616
performant when required but also apply backpressure
@@ -34,10 +34,10 @@ defmodule Logger do
3434
3535
This configuration is split in three categories:
3636
37-
* Application configuration - must be set before the logger
37+
* Application configuration - must be set before the Logger
3838
application is started
3939
40-
* Runtime configuration - can be set before the logger
40+
* Runtime configuration - can be set before the Logger
4141
application is started, but may be changed during runtime
4242
4343
* Error logger configuration - configuration for the
@@ -46,7 +46,7 @@ defmodule Logger do
4646
### Application configuration
4747
4848
The following configuration must be set via config files
49-
before the logger application is started.
49+
before the Logger application is started.
5050
5151
* `:backends` - the backends to be used. Defaults to `[:console]`.
5252
See the "Backends" section for more information.
@@ -87,7 +87,7 @@ defmodule Logger do
8787
to 8192 bytes. Note this configuration is approximate. Truncated
8888
messages will have `" (truncated)"` at the end.
8989
90-
* `:sync_threshold` - if the logger manager has more than
90+
* `:sync_threshold` - if the Logger manager has more than
9191
`sync_threshold` messages in its queue, Logger will change
9292
to sync mode, to apply backpressure to the clients.
9393
Logger will return to async mode once the number of messages
@@ -106,11 +106,11 @@ defmodule Logger do
106106
level: :warn,
107107
truncate: 4096
108108
109-
### Error logger configuration
109+
### Error Logger configuration
110110
111111
The following configuration applies to the Logger wrapper around
112112
Erlang's `error_logger`. All the configurations below must be set
113-
before the logger application starts.
113+
before the Logger application starts.
114114
115115
* `:handle_otp_reports` - redirects OTP reports to Logger so
116116
they are formatted in Elixir terms. This uninstalls Erlang's
@@ -153,7 +153,7 @@ defmodule Logger do
153153
is explored with detail below.
154154
155155
The initial backends are loaded via the `:backends` configuration,
156-
which must be set before the logger application is started.
156+
which must be set before the Logger application is started.
157157
158158
### Console backend
159159
@@ -303,9 +303,9 @@ defmodule Logger do
303303
end
304304

305305
@doc """
306-
Retrieves the logger level.
306+
Retrieves the Logger level.
307307
308-
The logger level can be changed via `configure/1`.
308+
The Logger level can be changed via `configure/1`.
309309
"""
310310
@spec level() :: level
311311
def level() do

lib/mix/lib/mix/dep.ex

+1-1
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ defmodule Mix.Dep do
219219
end
220220

221221
def format_status(%Mix.Dep{status: {:elixirlock, _}}),
222-
do: "the dependency was built with an out-of-date elixir version, run `#{mix_env_var}mix deps.compile`"
222+
do: "the dependency was built with an out-of-date Elixir version, run `#{mix_env_var}mix deps.compile`"
223223

224224
def format_status(%Mix.Dep{status: {:scmlock, _}}),
225225
do: "the dependency was built with another SCM, run `#{mix_env_var}mix deps.compile`"

lib/mix/lib/mix/tasks/app.start.ex

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ defmodule Mix.Tasks.App.Start do
2020
* `--no-compile` - do not compile even if files require compilation
2121
* `--no-protocols` - do not load consolidated protocols
2222
* `--no-deps-check` - do not check dependencies
23-
* `--no-elixir-version-check` - do not check elixir version
23+
* `--no-elixir-version-check` - do not check `elixir` version
2424
* `--no-start` - do not start applications after compilation
2525
2626
"""

lib/mix/lib/mix/tasks/compile.elixir.ex

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ defmodule Mix.Tasks.Compile.Elixir do
2222
* `--debug-info` (`--no-debug-info`) - attach (or not) debug info to compiled modules
2323
* `--ignore-module-conflict` - do not emit warnings if a module was previously defined
2424
* `--warnings-as-errors` - treat warnings as errors and return a non-zero exit code
25-
* `--elixirc-paths` - restrict the original elixirc paths to
25+
* `--elixirc-paths` - restrict the original `elixirc` paths to
2626
a subset of the ones specified. Can be given multiple times.
2727
2828
## Configuration

lib/mix/lib/mix/tasks/escript.build.ex

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ defmodule Mix.Tasks.Escript.Build do
4545
Defaults to app name. Set it to `nil` if no application should
4646
be started.
4747
48-
* `:embed_elixir` - if `true` embed elixir and its children apps
48+
* `:embed_elixir` - if `true` embed `elixir` and its children apps
4949
(`ex_unit`, `mix`, etc.) mentioned in the `:applications` list inside the
5050
`application` function in `mix.exs`.
5151

lib/mix/lib/mix/tasks/loadpaths.ex

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ defmodule Mix.Tasks.Loadpaths do
77
## Command line options
88
99
* `--no-deps-check` - do not check dependencies
10-
* `--no-elixir-version-check` - do not check elixir version
10+
* `--no-elixir-version-check` - do not check `elixir` version
1111
1212
"""
1313

lib/mix/lib/mix/tasks/test.ex

+3-3
Original file line numberDiff line numberDiff line change
@@ -167,15 +167,15 @@ defmodule Mix.Tasks.Test do
167167
Mix.shell.print_app
168168
Mix.Task.run "app.start", args
169169

170-
# Ensure ex_unit is loaded.
170+
# Ensure ExUnit is loaded.
171171
case Application.load(:ex_unit) do
172172
:ok -> :ok
173173
{:error, {:already_loaded, :ex_unit}} -> :ok
174174
end
175175

176-
# Configure ex_unit with command line options before requiring
176+
# Configure ExUnit with command line options before requiring
177177
# test helpers so that the configuration is available in helpers.
178-
# Then configure ex_unit again so command line options override
178+
# Then configure ExUnit again so command line options override
179179
opts = ex_unit_opts(opts)
180180
ExUnit.configure(opts)
181181

lib/mix/test/mix/tasks/deps_test.exs

+1-1
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ defmodule Mix.Tasks.DepsTest do
467467
File.write!("_build/dev/lib/ok/.compile.lock", ~s({v1, <<\"the_future\">>, scm}.))
468468
Mix.Task.clear
469469

470-
msg = " the dependency was built with an out-of-date elixir version, run `mix deps.compile`"
470+
msg = " the dependency was built with an out-of-date Elixir version, run `mix deps.compile`"
471471

472472
Mix.Tasks.Deps.run []
473473
assert_received {:mix_shell, :info, [^msg]}

0 commit comments

Comments
 (0)