Skip to content

Commit b5322b1

Browse files
committed
Merge pull request #3685 from eksperimental/corrections
Corrections
2 parents 8346bd2 + c79d63f commit b5322b1

File tree

10 files changed

+22
-22
lines changed

10 files changed

+22
-22
lines changed

lib/elixir/lib/code.ex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ defmodule Code do
8484
directories the Erlang VM uses for finding module code.
8585
8686
The path is expanded with `Path.expand/1` before being deleted. If the
87-
path does not exist it returns false.
87+
path does not exist it returns `false`.
8888
8989
## Examples
9090
@@ -341,11 +341,11 @@ defmodule Code do
341341
342342
## Examples
343343
344-
If the code is already loaded, it returns nil:
344+
If the code is already loaded, it returns `nil`:
345345
346346
Code.require_file("eex_test.exs","../eex/test") #=> nil
347347
348-
If the code is not already loaded, it returns the same as `load_file/2`:
348+
If the code is not loaded yet, it returns the same as `load_file/2`:
349349
350350
Code.require_file("eex_test.exs","../eex/test") |> List.first
351351
#=> {EExTest.Compiled, <<70, 79, 82, 49, ...>>}

lib/elixir/lib/kernel.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3160,7 +3160,7 @@ defmodule Kernel do
31603160
31613161
For each protocol in the `@derive` list, Elixir will assert there is an
31623162
implementation of that protocol for any (regardless if fallback to any
3163-
is true) and check if the any implementation defines a `__deriving__/3`
3163+
is `true`) and check if the any implementation defines a `__deriving__/3`
31643164
callback. If so, the callback is invoked, otherwise an implementation
31653165
that simply points to the any implementation is automatically derived.
31663166

lib/elixir/lib/string.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ defmodule String do
358358
359359
## Options
360360
361-
* :trim - when true, does not emit empty patterns
361+
* :trim - when `true`, does not emit empty patterns
362362
"""
363363
@spec splitter(t, pattern, Keyword.t) :: Enumerable.t
364364
def splitter(string, pattern, options \\ []) do

lib/elixir/test/elixir/kernel/quote_test.exs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ defmodule Kernel.QuoteTest do
1212
end
1313

1414
test "keep line" do
15-
## DO NOT MOVE THIS LINE
15+
# DO NOT MOVE THIS LINE
1616
assert quote(location: :keep, do: bar(1, 2, 3)) ==
1717
{:bar, [file: Path.relative_to_cwd(__ENV__.file), keep: 16], [1, 2, 3]}
1818
end
@@ -22,7 +22,7 @@ defmodule Kernel.QuoteTest do
2222
end
2323

2424
test "quote line var" do
25-
## DO NOT MOVE THIS LINE
25+
# DO NOT MOVE THIS LINE
2626
line = __ENV__.line
2727
assert quote(line: line, do: bar(1, 2, 3)) == {:bar, [line: 26], [1, 2, 3]}
2828
end
@@ -195,7 +195,7 @@ defmodule Kernel.QuoteTest do
195195
end
196196
end
197197

198-
## DO NOT MOVE THIS LINE
198+
# DO NOT MOVE THIS LINE
199199
defmodule Kernel.QuoteTest.Errors do
200200
defmacro defadd do
201201
quote location: :keep do

lib/ex_unit/lib/ex_unit/formatter.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ defmodule ExUnit.Formatter do
9090
9191
## Examples
9292
93-
iex> format_filters([run: true, slow: false], :include)
94-
"Including tags: [run: true, slow: false]"
93+
iex> format_filters([run: true, slow: false], :include)
94+
"Including tags: [run: true, slow: false]"
9595
9696
"""
9797
@spec format_filters(Keyword.t, atom) :: String.t

lib/mix/lib/mix/hex.ex

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ defmodule Mix.Hex do
33
@hex_requirement ">= 0.5.0"
44

55
@doc """
6-
Returns true if Hex is loaded or installed, otherwise returns false.
6+
Returns `true` if `Hex` is loaded or installed. Otherwise returns `false`.
77
"""
88
@spec ensure_installed?(atom) :: boolean
99
def ensure_installed?(app) do
@@ -22,15 +22,15 @@ defmodule Mix.Hex do
2222
end
2323

2424
@doc """
25-
Returns true if have required Hex, returns false if don't and don't update,
26-
if update then exits.
25+
Returns `true` if it has the required `Hex`. If an update is performed, it then exits.
26+
Otherwise returns `false` without updating anything.
2727
"""
2828
@spec ensure_updated?() :: boolean
2929
def ensure_updated?() do
3030
cond do
31-
!Code.ensure_loaded?(Hex) ->
31+
not Code.ensure_loaded?(Hex) ->
3232
false
33-
!Version.match?(Hex.version, @hex_requirement) ->
33+
not Version.match?(Hex.version, @hex_requirement) ->
3434
Mix.shell.info "Mix requires hex #{@hex_requirement} but you have #{Hex.version}"
3535

3636
if Mix.shell.yes?("Shall I abort the current command and update hex?") do
@@ -45,7 +45,7 @@ defmodule Mix.Hex do
4545
end
4646

4747
@doc """
48-
Ensures Hex is started.
48+
Ensures `Hex` is started.
4949
"""
5050
def start do
5151
try do

lib/mix/lib/mix/project.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ defmodule Mix.Project do
370370
@doc """
371371
Ensures the project structure exists.
372372
373-
In case it does, it is a no-op, otherwise, it is built.
373+
In case it does exist, it is a no-op. Otherwise, it is built.
374374
"""
375375
def ensure_structure(config \\ config(), opts \\ []) do
376376
if File.exists?(app_path(config)) do

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ defmodule Mix.Tasks.App.Start do
77
Starts all registered apps.
88
99
The application is started by default as temporary. In case
10-
`:start_permanent` is set to true in your project configuration
10+
`:start_permanent` is set to `true` in your project configuration
1111
or the `--permanent` flag is given, it is started as permanent,
1212
which guarantee the node will shutdown in case the application
1313
crashes permanently.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ defmodule Mix.Tasks.Compile do
1414
* `:compilers` - compilers to run, defaults to:
1515
`[:yeec, :leex, :erlang, :elixir, :app]`
1616
17-
* `:consolidate_protocols` - when true, runs protocol
17+
* `:consolidate_protocols` - when `true`, runs protocol
1818
consolidation via the `compile.protocols` task
1919
20-
* `:build_embedded` - when true, activates protocol
20+
* `:build_embedded` - when `true`, activates protocol
2121
consolidation and does not generate symlinks in builds
2222
2323
## Command line options

lib/mix/lib/mix/tasks/profile.fprof.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,15 @@ defmodule Mix.Tasks.Profile.Fprof do
102102
this should give you a more correct insight into your real bottlenecks.
103103
Profiling with other environments might produce some false bottlenecks, such as
104104
protocol dispatches, which perform much faster with the `prod` environment when
105-
`build_embedded` is true (which is the default for production).
105+
`build_embedded` is `true` (which is the default for production).
106106
"""
107107

108108
@spec run(OptionParser.argv) :: :ok
109109
def run(args) do
110110
unless Mix.Project.config[:build_embedded] do
111111
IO.puts """
112112
Warning: It's advised to run this task when build_embedded is set
113-
to true (usually the prod environment). Otherwise, the results may
113+
to `true` (usually the prod environment). Otherwise, the results may
114114
contain false bottlenecks which will not appear in production.
115115
"""
116116
end

0 commit comments

Comments
 (0)