Skip to content

Commit e0f5dd5

Browse files
committed
Apply uniform capitalization and punctuation rules to all lists
* Never use capital letters after `-`. Sentences start right after the bullet and continue to the first period. * When list elements are one or two sentences, use non-capitalized format without terminators. The two sentences are converted into one, separated by a semicolon. This mainly applies to the cases with short sentences or when only one of many list elements needs to have two sentences. Example: * `:opt_a` - basic description, no terminator * `:opt_b` - also short description; this used to be second sentence * When at least one list element needs to have real sentences, the whole list is formatted like that, with a period at the end of each element: * `:opt_a` - this is still short. * `:opt_b` or `:opt_c` - but this is longer. May have multiple sentences. Or even paragraphs.
1 parent 5550323 commit e0f5dd5

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+328
-326
lines changed

lib/eex/lib/eex.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ defmodule EEx do
3434
All functions in this module accepts EEx-related options.
3535
They are:
3636
37-
* `:line` - the line to be used as the template start. Defaults to 1;
37+
* `:line` - the line to be used as the template start. Defaults to 1.
3838
* `:file` - the file to be used in the template. Defaults to the given
3939
file the template is read from or to "nofile" when compiling
40-
from a string;
40+
from a string.
4141
* `:engine` - the EEx engine to be used for compilation.
4242
4343
## Engine

lib/eex/lib/eex/engine.ex

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ defmodule EEx.Engine do
55
66
* `handle_body(quoted)` - receives the final built quoted
77
expression, should do final post-processing and return a
8-
quoted expression;
8+
quoted expression.
99
1010
* `handle_text(buffer, text)` - it receives the buffer,
11-
the text and must return a new quoted expression;
11+
the text and must return a new quoted expression.
1212
1313
* `handle_expr(buffer, marker, expr)` - it receives the buffer,
14-
the marker, the expr and must return a new quoted expression;
14+
the marker, the expr and must return a new quoted expression.
1515
1616
The marker is what follows exactly after `<%`. For example,
1717
`<% foo %>` has an empty marker, but `<%= foo %>` has `"="`

lib/elixir/lib/application.ex

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,8 @@ defmodule Application do
152152
153153
## Options
154154
155-
* `:timeout` - the timeout for the change (defaults to 5000ms);
156-
157-
* `:persistent` - persists the given value on application load and reloads;
155+
* `:timeout` - the timeout for the change (defaults to 5000ms)
156+
* `:persistent` - persists the given value on application load and reloads
158157
159158
If `put_env/4` is called before the application is loaded, the application
160159
environment values specified in the `.app` file will override the ones
@@ -224,15 +223,15 @@ defmodule Application do
224223
The `type` argument specifies the type of the application:
225224
226225
* `:permanent` - if `app` terminates, all other applications and the entire
227-
node are also terminated;
226+
node are also terminated.
228227
229228
* `:transient` - if `app` terminates with `:normal` reason, it is reported
230229
but no other applications are terminated. If a transient application
231230
terminates abnormally, all other applications and the entire node are
232-
also terminated;
231+
also terminated.
233232
234233
* `:temporary` - if `app` termiantes, it is reported but no other
235-
applications are terminated (the default);
234+
applications are terminated (the default).
236235
237236
Note that it is always possible to stop an application explicitly by calling
238237
`stop/1`. Regardless of the type of the application, no other applications will

lib/elixir/lib/bitwise.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ defmodule Bitwise do
2424
Allow a developer to use this module in their programs with
2525
the following options:
2626
27-
* `:only_operators` - Include only operators;
28-
* `:skip_operators` - Skip operators;
27+
* `:only_operators` - include only operators
28+
* `:skip_operators` - skip operators
2929
3030
"""
3131
defmacro __using__(options) do

lib/elixir/lib/code.ex

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,11 @@ defmodule Code do
7171
* `:requires` - a list of modules required
7272
7373
* `:functions` - a list of tuples where the first element is a module
74-
and the second a list of imported function names and arity. The list
74+
and the second a list of imported function names and arity; the list
7575
of function names and arity must be sorted
7676
7777
* `:macros` - a list of tuples where the first element is a module
78-
and the second a list of imported macro names and arity. The list
78+
and the second a list of imported macro names and arity; the list
7979
of function names and arity must be sorted
8080
8181
Notice that setting any of the values above overrides Elixir's default
@@ -201,13 +201,13 @@ defmodule Code do
201201
202202
## Options
203203
204-
* `:file` - The filename to be used in stacktraces
205-
and the file reported in the `__ENV__` variable.
204+
* `:file` - the filename to be used in stacktraces
205+
and the file reported in the `__ENV__` variable
206206
207-
* `:line` - The line reported in the `__ENV__` variable.
207+
* `:line` - the line reported in the `__ENV__` variable
208208
209-
* `:existing_atoms_only` - When `true`, raises an error
210-
when non-existing atoms are found by the tokenizer.
209+
* `:existing_atoms_only` - when `true`, raises an error
210+
when non-existing atoms are found by the tokenizer
211211
212212
## Macro.to_string/2
213213
@@ -328,17 +328,17 @@ defmodule Code do
328328
Available options are:
329329
330330
* `:docs` - when `true`, retain documentation in the compiled module,
331-
`true` by default;
331+
`true` by default
332332
333333
* `:debug_info` - when `true`, retain debug information in the compiled
334-
module. This allows a developer to reconstruct the original source
335-
code, `false` by default;
334+
module; this allows a developer to reconstruct the original source
335+
code, `false` by default
336336
337337
* `:ignore_module_conflict` - when `true`, override modules that were
338-
already defined without raising errors, `false` by default;
338+
already defined without raising errors, `false` by default
339339
340340
* `:warnings_as_errors` - cause compilation to fail when warnings are
341-
generated;
341+
generated
342342
343343
"""
344344
def compiler_options(opts) do

lib/elixir/lib/file.ex

Lines changed: 58 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -10,40 +10,40 @@ defmodule File.Stat do
1010
1111
Its fields are:
1212
13-
* `size` - Size of file in bytes.
13+
* `size` - size of file in bytes.
1414
15-
* `type` - `:device`, `:directory`, `:regular`, `:other`. The type of the
15+
* `type` - `:device | :directory | :regular | :other`; the type of the
1616
file.
1717
18-
* `access` - `:read`, `:write`, `:read_write`, `:none`. The current system
18+
* `access` - `:read | :write | :read_write | :none`; the current system
1919
access to the file.
2020
21-
* `atime` - The last time the file was read.
21+
* `atime` - the last time the file was read.
2222
23-
* `mtime` - The last time the file was written.
23+
* `mtime` - the last time the file was written.
2424
25-
* `ctime` - The interpretation of this time field depends on the operating
25+
* `ctime` - the interpretation of this time field depends on the operating
2626
system. On Unix, it is the last time the file or the inode was changed.
27-
In Windows, it is the create time.
27+
In Windows, it is the time of creation.
2828
29-
* `mode` - The file permissions.
29+
* `mode` - the file permissions.
3030
31-
* `links` - The number of links to this file. This is always 1 for file
31+
* `links` - the number of links to this file. This is always 1 for file
3232
systems which have no concept of links.
3333
34-
* `major_device` - Identifies the file system where the file is located.
34+
* `major_device` - identifies the file system where the file is located.
3535
In windows, the number indicates a drive as follows: 0 means A:, 1 means
3636
B:, and so on.
3737
38-
* `minor_device` - Only valid for character devices on Unix. In all other
38+
* `minor_device` - only valid for character devices on Unix. In all other
3939
cases, this field is zero.
4040
41-
* `inode` - Gives the inode number. On non-Unix file systems, this field
41+
* `inode` - gives the inode number. On non-Unix file systems, this field
4242
will be zero.
4343
44-
* `uid` - Indicates the owner of the file.
44+
* `uid` - indicates the owner of the file.
4545
46-
* `gid` - Gives the group that the owner of the file belongs to. Will be
46+
* `gid` - gives the group that the owner of the file belongs to. Will be
4747
zero for non-Unix file systems.
4848
4949
The time type returned in `atime`, `mtime`, and `ctime` is dependent on the
@@ -280,13 +280,13 @@ defmodule File do
280280
281281
Typical error reasons are:
282282
283-
* `:eacces` - Missing search or write permissions for the parent directories
284-
of `path`.
285-
* `:eexist` - There is already a file or directory named `path`.
286-
* `:enoent` - A component of `path` does not exist.
287-
* `:enospc` - There is a no space left on the device.
288-
* `:enotdir` - A component of `path` is not a directory.
289-
On some platforms, `:enoent` is returned instead.
283+
* `:eacces` - missing search or write permissions for the parent
284+
directories of `path`
285+
* `:eexist` - there is already a file or directory named `path`
286+
* `:enoent` - a component of `path` does not exist
287+
* `:enospc` - there is a no space left on the device
288+
* `:enotdir` - a component of `path` is not a directory;
289+
on some platforms, `:enoent` is returned instead
290290
"""
291291
@spec mkdir(Path.t) :: :ok | {:error, posix}
292292
def mkdir(path) do
@@ -312,10 +312,10 @@ defmodule File do
312312
313313
Typical error reasons are:
314314
315-
* `:eacces` - Missing search or write permissions for the parent directories
316-
of `path`.
317-
* `:enospc` - There is a no space left on the device.
318-
* `:enotdir` - A component of `path` is not a directory.
315+
* `:eacces` - missing search or write permissions for the parent
316+
directories of `path`
317+
* `:enospc` - there is a no space left on the device
318+
* `:enotdir` - a component of `path` is not a directory
319319
"""
320320
@spec mkdir_p(Path.t) :: :ok | {:error, posix}
321321
def mkdir_p(path) do
@@ -341,13 +341,13 @@ defmodule File do
341341
342342
Typical error reasons:
343343
344-
* `:enoent` - The file does not exist.
345-
* `:eacces` - Missing permission for reading the file,
346-
or for searching one of the parent directories.
347-
* `:eisdir` - The named file is a directory.
348-
* `:enotdir` - A component of the file name is not a directory.
349-
On some platforms, `:enoent` is returned instead.
350-
* `:enomem` - There is not enough memory for the contents of the file.
344+
* `:enoent` - the file does not exist
345+
* `:eacces` - missing permission for reading the file,
346+
or for searching one of the parent directories
347+
* `:eisdir` - the named file is a directory
348+
* `:enotdir` - a component of the file name is not a directory;
349+
on some platforms, `:enoent` is returned instead
350+
* `:enomem` - there is not enough memory for the contents of the file
351351
352352
You can use `:file.format_error/1` to get a descriptive string of the error.
353353
"""
@@ -381,8 +381,7 @@ defmodule File do
381381
382382
The accepted options are:
383383
384-
* `:time` if the time should be `:local`, `:universal` or `:posix`.
385-
Default is `:local`.
384+
* `:time` - `:local | :universal | :posix`; default: `:local`
386385
387386
"""
388387
@spec stat(Path.t, stat_options) :: {:ok, File.Stat.t} | {:error, posix}
@@ -728,13 +727,13 @@ defmodule File do
728727
729728
Typical error reasons are:
730729
731-
* `:enoent` - A component of the file name does not exist.
732-
* `:enotdir` - A component of the file name is not a directory.
733-
On some platforms, enoent is returned instead.
734-
* `:enospc` - There is a no space left on the device.
735-
* `:eacces` - Missing permission for writing the file or searching one of the
736-
parent directories.
737-
* `:eisdir` - The named file is a directory.
730+
* `:enoent` - a component of the file name does not exist
731+
* `:enotdir` - a component of the file name is not a directory;
732+
on some platforms, enoent is returned instead
733+
* `:enospc` - there is a no space left on the device
734+
* `:eacces` - missing permission for writing the file or searching one of
735+
the parent directories
736+
* `:eisdir` - the named file is a directory
738737
739738
The writing is automatically done in `:raw` mode. Check
740739
`File.open/2` for other available options.
@@ -765,12 +764,12 @@ defmodule File do
765764
766765
Typical error reasons are:
767766
768-
* `:enoent` - The file does not exist.
769-
* `:eacces` - Missing permission for the file or one of its parents.
770-
* `:eperm` - The file is a directory and user is not super-user.
771-
* `:enotdir` - A component of the file name is not a directory.
772-
On some platforms, enoent is returned instead.
773-
* `:einval` - Filename had an improper type, such as tuple.
767+
* `:enoent` - the file does not exist
768+
* `:eacces` - missing permission for the file or one of its parents
769+
* `:eperm` - the file is a directory and user is not super-user
770+
* `:enotdir` - a component of the file name is not a directory;
771+
on some platforms, enoent is returned instead
772+
* `:einval` - filename had an improper type, such as tuple
774773
775774
## Examples
776775
@@ -966,31 +965,31 @@ defmodule File do
966965
967966
The allowed modes:
968967
969-
* `:read` - The file, which must exist, is opened for reading.
968+
* `:read` - the file, which must exist, is opened for reading.
970969
971-
* `:write` - The file is opened for writing. It is created if it does not
970+
* `:write` - the file is opened for writing. It is created if it does not
972971
exist.
973972
974-
If the file exists, and if write is not combined with read, the file will
975-
be truncated.
973+
If the file does exists, and if write is not combined with read, the file
974+
will be truncated.
976975
977-
* `:append` - The file will be opened for writing, and it will be created
976+
* `:append` - the file will be opened for writing, and it will be created
978977
if it does not exist. Every write operation to a file opened with append
979978
will take place at the end of the file.
980979
981-
* `:exclusive` - The file, when opened for writing, is created if it does
980+
* `:exclusive` - the file, when opened for writing, is created if it does
982981
not exist. If the file exists, open will return `{:error, :eexist}`.
983982
984-
* `:char_list` - When this term is given, read operations on the file will
985-
return char lists rather than binaries;
983+
* `:char_list` - when this term is given, read operations on the file will
984+
return char lists rather than binaries.
986985
987-
* `:compressed` - Makes it possible to read or write gzip compressed files.
986+
* `:compressed` - makes it possible to read or write gzip compressed files.
988987
989988
The compressed option must be combined with either read or write, but not
990989
both. Note that the file size obtained with `stat/1` will most probably
991990
not match the number of bytes that can be read from a compressed file.
992991
993-
* `:utf8` - This option denotes how data is actually stored in the disk
992+
* `:utf8` - this option denotes how data is actually stored in the disk
994993
file and makes the file perform automatic translation of characters to
995994
and from utf-8.
996995
@@ -1004,7 +1003,7 @@ defmodule File do
10041003
10051004
This function returns:
10061005
1007-
* `{:ok, io_device}` - The file has been opened in the requested mode.
1006+
* `{:ok, io_device}` - the file has been opened in the requested mode.
10081007
10091008
`io_device` is actually the pid of the process which handles the file.
10101009
This process is linked to the process which originally opened the file.
@@ -1014,7 +1013,7 @@ defmodule File do
10141013
An `io_device` returned from this call can be used as an argument to the
10151014
`IO` module functions.
10161015
1017-
* `{:error, reason}` - The file could not be opened.
1016+
* `{:error, reason}` - the file could not be opened.
10181017
10191018
## Examples
10201019

0 commit comments

Comments
 (0)