Skip to content

Commit 77155c5

Browse files
author
José Valim
committed
Merge pull request #1406 from jwarwick/mix_typos
Fixed typos in various Mix modules
2 parents e7c0a2a + 776b07f commit 77155c5

File tree

10 files changed

+60
-60
lines changed

10 files changed

+60
-60
lines changed

lib/mix/lib/mix.ex

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ defmodule Mix do
55
build tool for Clojure and was written by one of its contributors.
66
77
This module works as a facade for accessing the most common functionality
8-
in Elixir, as the shell and the current project configuration.
8+
in Elixir, such as the shell and the current project configuration.
99
10-
For getting started with Elixir, checkout out the guide available in
10+
For getting started with Elixir, checkout out the guide available on
1111
[Elixir's website](http://elixir-lang.org).
1212
"""
1313

@@ -37,7 +37,7 @@ defmodule Mix do
3737

3838
@doc """
3939
Changes the current mix env. Project configuration loaded
40-
per environment is not going to be reloaded.
40+
per environment will not be reloaded.
4141
"""
4242
def env(env) when is_atom(env) do
4343
Mix.Server.cast({ :env, env })
@@ -52,7 +52,7 @@ defmodule Mix do
5252
end
5353

5454
@doc """
55-
Starts mix and loads the project and dependencies into
55+
Starts mix and loads the project and dependencies in
5656
one step. Useful when invoking mix from an external tool.
5757
"""
5858
def loadpaths do
@@ -64,8 +64,8 @@ defmodule Mix do
6464
The shell is a wrapper for doing IO.
6565
6666
It contains conveniences for asking the user information,
67-
printing status and so forth. The fact it is also swappable
68-
allow developers to use a test shell, that simply sends the
67+
printing status and so forth. It is also swappable,
68+
allowing developers to use a test shell that simply sends the
6969
messages to the current process.
7070
"""
7171
def shell do
@@ -81,9 +81,9 @@ defmodule Mix do
8181

8282
@doc """
8383
Retrieves the current project configuration. If there
84-
isn't a project defined, this function will simply
84+
is not a project defined, this function will
8585
return an empty keyword list. This allows many mix
86-
tasks to work without a need for an underlying project.
86+
tasks to work without the need for an underlying project.
8787
"""
8888
def project do
8989
Mix.Project.config

lib/mix/lib/mix/archive.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ defmodule Mix.Archive do
55
An archive is a zip file containing the app and beam files.
66
A valid archive must be named with the name of the application and
77
it should contain the relative paths beginning with the application
8-
name, e.g. root of zip file should be `my_app/ebin/Elixir.My.App.beam`.
8+
name, e.g. the root of the zip file should be `my_app/ebin/Elixir.My.App.beam`.
99
"""
1010

1111
@doc """
12-
Returns the archive name based on the app and version.
12+
Returns the archive name based on `app` and version.
1313
"""
1414
def name(app, nil), do: "#{app}.ez"
1515
def name(app, vsn), do: "#{app}-#{vsn}.ez"

lib/mix/lib/mix/deps.ex

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@ defrecord Mix.Dep, [ scm: nil, app: nil, requirement: nil, status: nil, opts: ni
22
deps: [], source: nil, manager: nil, from: nil ] do
33
@moduledoc """
44
This is a record that keeps information about your project
5-
dependencies. It keeps:
6-
7-
* scm - a module representing the source code management tool (SCM) operations;
8-
* app - the app name as an atom;
9-
* requirement - a binary or regex with the dep's requirement
10-
* status - the current status of dependency, check `Mix.Deps.format_status/1` for more info;
11-
* opts - the options given by the developer
12-
* deps - dependencies of this dependency
13-
* source - any possible configuration associated with the manager field,
14-
rebar.config for rebar or the Mix.Project for Mix
15-
* manager - the project management, possible values: :rebar | :mix | :make | nil
16-
* from - path to file where dependency was defined
5+
dependencies. It contains:
6+
7+
* `scm` - a module representing the source code management tool (SCM) operations;
8+
* `app` - the application name as an atom;
9+
* `requirement` - a binary or regex with the dependency's requirement
10+
* `status` - the current status of the dependency, check `Mix.Deps.format_status/1` for more info;
11+
* `opts` - the options given by the developer
12+
* `deps` - dependencies of this dependency
13+
* `source` - any possible configuration associated with the `manager` field,
14+
`rebar.config` for rebar or the `Mix.Project` for Mix
15+
* `manager` - the project management, possible values: `:rebar` | `:mix` | `:make` | `nil`
16+
* `from` - path to the file where the dependency was defined
1717
"""
1818
end
1919

@@ -23,20 +23,20 @@ defmodule Mix.Deps do
2323
"""
2424

2525
@doc """
26-
Returns all dependencies recursively as `Mix.Dep` record.
26+
Return all dependencies recursively as a `Mix.Dep` record.
2727
2828
## Exceptions
2929
30-
This function raises an exception in case the developer
31-
provides a dependency in the wrong format.
30+
This function raises an exception if the provided
31+
dependency is in the wrong format.
3232
"""
3333
def all do
3434
{ deps, _ } = Mix.Deps.Converger.all(nil, fn(dep, acc) -> { dep, acc } end)
3535
deps
3636
end
3737

3838
@doc """
39-
Returns all dependencies but with a custom callback and
39+
Return all dependencies, but with a custom callback and
4040
accumulator.
4141
"""
4242
def all(acc, callback) do
@@ -45,12 +45,12 @@ defmodule Mix.Deps do
4545
end
4646

4747
@doc """
48-
Returns all direct child dependencies.
48+
Return all direct child dependencies.
4949
"""
5050
defdelegate children(), to: Mix.Deps.Retriever
5151

5252
@doc """
53-
Returns all dependencies depending on given dependencies.
53+
Return all dependencies depending on the given dependencies.
5454
"""
5555
def depending(deps, all_deps // all)
5656

@@ -69,7 +69,7 @@ defmodule Mix.Deps do
6969
end
7070

7171
@doc """
72-
Receives a list of deps names and returns deps records.
72+
Receives a list of dependency names and returns dependency records.
7373
Logs a message if the dependency could not be found.
7474
"""
7575
def by_name(given, all_deps // all) do
@@ -93,9 +93,9 @@ defmodule Mix.Deps do
9393
end
9494

9595
@doc """
96-
Runs the given `fun` inside the given dependency project by
96+
Run the given `fun` inside the given dependency project by
9797
changing the current working directory and loading the given
98-
project into the project stack.
98+
project onto the project stack.
9999
"""
100100
def in_dependency(dep, post_config // [], fun)
101101

@@ -123,13 +123,13 @@ defmodule Mix.Deps do
123123
end
124124

125125
@doc """
126-
Formats the status of a dependency.
126+
Format the status of a dependency.
127127
"""
128128
def format_status(Mix.Dep[status: { :ok, _vsn }]),
129129
do: "ok"
130130

131131
def format_status(Mix.Dep[status: { :noappfile, path }]),
132-
do: "could not find app file at #{Mix.Utils.relative_to_cwd(path)}"
132+
do: "could not find an app file at #{Mix.Utils.relative_to_cwd(path)}"
133133

134134
def format_status(Mix.Dep[status: { :invalidapp, path }]),
135135
do: "the app file at #{Mix.Utils.relative_to_cwd(path)} is invalid"
@@ -160,7 +160,7 @@ defmodule Mix.Deps do
160160
do: "the dependency is not available, run `mix deps.get`"
161161

162162
@doc """
163-
Checks the lock for the given dependency and update its status accordingly.
163+
Check the lock for the given dependency and update its status accordingly.
164164
"""
165165
def check_lock(Mix.Dep[scm: scm, app: app, opts: opts] = dep, lock) do
166166
if available?(dep) do
@@ -179,7 +179,7 @@ defmodule Mix.Deps do
179179
end
180180

181181
@doc """
182-
Updates the dependency inside the given project.
182+
Update the dependency inside the given project.
183183
"""
184184
defdelegate update(dep), to: Mix.Deps.Retriever
185185

@@ -205,7 +205,7 @@ defmodule Mix.Deps do
205205
end
206206

207207
@doc """
208-
Check if a dependency is out of date or not, considering its
208+
Check if a dependency is out of date, considering its
209209
lock status. Therefore, be sure to call `check_lock` before
210210
invoking this function.
211211
"""
@@ -214,7 +214,7 @@ defmodule Mix.Deps do
214214
def out_of_date?(dep), do: not available?(dep)
215215

216216
@doc """
217-
Format the dependency for printing.
217+
Format a dependency for printing.
218218
"""
219219
def format_dep(Mix.Dep[scm: scm, app: app, status: status, opts: opts]) do
220220
version =
@@ -227,7 +227,7 @@ defmodule Mix.Deps do
227227
end
228228

229229
@doc """
230-
Returns all compile paths for the dependency.
230+
Return all compile paths for the dependency.
231231
"""
232232
def compile_paths(Mix.Dep[app: app, opts: opts, manager: manager]) do
233233
if manager == :mix do
@@ -240,7 +240,7 @@ defmodule Mix.Deps do
240240
end
241241

242242
@doc """
243-
Returns all load paths for the dependency.
243+
Return all load paths for the dependency.
244244
"""
245245
def load_paths(Mix.Dep[manager: :mix, app: app, opts: opts]) do
246246
paths = Mix.Project.in_project app, opts[:dest], fn _ ->
@@ -267,21 +267,21 @@ defmodule Mix.Deps do
267267
end
268268

269269
@doc """
270-
Returns true if dependency is a mix project.
270+
Return `true` if dependency is a mix project.
271271
"""
272272
def mix?(Mix.Dep[manager: manager]) do
273273
manager == :mix
274274
end
275275

276276
@doc """
277-
Returns true if dependency is a rebar project.
277+
Return `true` if dependency is a rebar project.
278278
"""
279279
def rebar?(Mix.Dep[manager: manager]) do
280280
manager == :rebar
281281
end
282282

283283
@doc """
284-
Returns true if dependency is a make project.
284+
Return `true` if dependency is a make project.
285285
"""
286286
def make?(Mix.Dep[manager: manager]) do
287287
manager == :make

lib/mix/lib/mix/tasks/deps.check.ex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ defmodule Mix.Tasks.Deps.Check do
44
import Mix.Deps, only: [all: 0, format_dep: 1, format_status: 1, check_lock: 2, out_of_date?: 1]
55

66
@hidden true
7-
@shortdoc "Check if all dependencies are ok"
7+
@shortdoc "Check if all dependencies are valid"
88
@recursive :both
99

1010
@moduledoc """
1111
Checks if all dependencies are valid and if not, abort.
12-
Prints the invalid dependencies status before aborting.
12+
Prints the invalid dependencies' status before aborting.
1313
1414
This task is not shown in `mix help` but it is part
15-
of mix public API and can be depended on.
15+
of the `mix` public API and can be depended on.
1616
"""
1717
def run(_) do
1818
lock = Mix.Deps.Lock.read

lib/mix/lib/mix/tasks/deps.clean.ex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
defmodule Mix.Tasks.Deps.Clean do
22
use Mix.Task
33

4-
@shortdoc "Remove dependencies files"
4+
@shortdoc "Remove dependencies' files"
55
@recursive :both
66

77
@moduledoc """
88
Clean dependencies.
99
10-
By default, cleans all dependencies. A list of deps can
10+
By default, cleans all dependencies. A list of dependencies can
1111
be given to clean specific ones. Clean does not unlock
12-
the repositories, unless --unlock is given.
12+
the repositories, unless `--unlock` is given.
1313
"""
1414

1515
import Mix.Deps, only: [all: 0, by_name: 1, format_dep: 1]

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ defmodule Mix.Tasks.Deps.Compile do
77
@moduledoc """
88
Compile dependencies.
99
10-
By default, compile all dependencies. A list of deps can
11-
be given to force the compilation of specific deps.
10+
By default, compile all dependencies. A list of dependencies can
11+
be given to force the compilation of specific dependencies.
1212
13-
By default, it tries to detect if the project contains one of
13+
By default, attempt to detect if the project contains one of
1414
the following files:
1515
1616
* `mix.exs` - if so, invokes `mix compile`
@@ -97,7 +97,7 @@ defmodule Mix.Tasks.Deps.Compile do
9797
catch
9898
kind, reason ->
9999
Mix.shell.error "could not compile dependency #{app}, mix compile failed. " <>
100-
"In case you want to recompile this dependency, please run: mix deps.compile #{app}"
100+
"If you want to recompile this dependency, please run: mix deps.compile #{app}"
101101
:erlang.raise(kind, reason, System.stacktrace)
102102
after
103103
Mix.env(old_env)
@@ -129,7 +129,7 @@ defmodule Mix.Tasks.Deps.Compile do
129129
defp do_command(app, command, extra // "") do
130130
if Mix.shell.cmd("#{command} #{extra}") != 0 do
131131
raise Mix.Error, message: "could not compile dependency #{app}, #{command} command failed. " <>
132-
"In case you want to recompile this dependency, please run: mix deps.compile #{app}"
132+
"If you want to recompile this dependency, please run: mix deps.compile #{app}"
133133
end
134134
end
135135

@@ -141,7 +141,7 @@ defmodule Mix.Tasks.Deps.Compile do
141141
Mix.shell.info("#{app}: #{command}")
142142
if Mix.shell.cmd(command) != 0 do
143143
raise Mix.Error, message: "could not compile dependency #{app}, custom #{command} command failed. " <>
144-
"In case you want to recompile this dependency, please run: mix deps.compile #{app}"
144+
"If you want to recompile this dependency, please run: mix deps.compile #{app}"
145145
end
146146
end
147147
end

lib/mix/lib/mix/tasks/deps.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ defmodule Mix.Tasks.Deps do
88

99
@moduledoc """
1010
List all dependencies and their status.
11-
The output is given as follow:
11+
The output is given as follows:
1212
1313
* APP [VERSION] SCM: LOCATION
1414
[locked at REF]

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ defmodule Mix.Tasks.Deps.Loadpaths do
44
import Mix.Deps, only: [all: 0, load_paths: 1, ok?: 1]
55

66
@hidden true
7-
@shortdoc "Load all dependencies paths"
7+
@shortdoc "Load all dependencies' paths"
88
@recursive :both
99

1010
@moduledoc """
1111
Loads all dependencies. This is invoked directly
12-
by "loadpaths" when the CLI boots.
12+
by `loadpaths` when the CLI boots.
1313
"""
1414
def run(args) do
1515
{ opts, _ } = OptionParser.parse(args)

lib/mix/lib/mix/tasks/deps.update.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ defmodule Mix.Tasks.Deps.Update do
77
@moduledoc """
88
Update dependencies.
99
10-
By default, updates all dependencies. A list of deps can
10+
By default, updates all dependencies. A list of dependencies can
1111
be given to update specific ones. Recompiles the given
1212
projects after updating.
1313

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ defmodule Mix.Tasks.DepsTest do
6565
assert_received { :mix_shell, :info, ["* invalidapp [path: \"deps/invalidapp\"]"] }
6666
assert_received { :mix_shell, :info, [" the app file at deps/invalidapp/ebin/invalidapp.app is invalid"] }
6767
assert_received { :mix_shell, :info, ["* noappfile [path: \"deps/noappfile\"]"] }
68-
assert_received { :mix_shell, :info, [" could not find app file at deps/noappfile/ebin/noappfile.app"] }
68+
assert_received { :mix_shell, :info, [" could not find an app file at deps/noappfile/ebin/noappfile.app"] }
6969
assert_received { :mix_shell, :info, ["* uncloned [git: \"https://github.com/elixir-lang/uncloned.git\"]"] }
7070
assert_received { :mix_shell, :info, [" the dependency is not available, run `mix deps.get`"] }
7171
end
@@ -131,7 +131,7 @@ defmodule Mix.Tasks.DepsTest do
131131
assert_received { :mix_shell, :error, ["* invalidapp [path: \"deps/invalidapp\"]"] }
132132
assert_received { :mix_shell, :error, [" the app file at deps/invalidapp/ebin/invalidapp.app is invalid"] }
133133
assert_received { :mix_shell, :error, ["* noappfile [path: \"deps/noappfile\"]"] }
134-
assert_received { :mix_shell, :error, [" could not find app file at deps/noappfile/ebin/noappfile.app"] }
134+
assert_received { :mix_shell, :error, [" could not find an app file at deps/noappfile/ebin/noappfile.app"] }
135135
assert_received { :mix_shell, :error, ["* uncloned [git: \"https://github.com/elixir-lang/uncloned.git\"]"] }
136136
assert_received { :mix_shell, :error, [" the dependency is not available, run `mix deps.get`"] }
137137
end

0 commit comments

Comments
 (0)