Commit Graph
4260 Commits
Author SHA1 Message Date
José Valim f6a681c3eb Ensure binding() doesn't warn on underscored vars, closes #3708 2015-09-11 11:25:27 +02:00
José Valim 12f89a30b4 Merge pull request #3704 from eksperimental/pin_operator
Mention the Pin Operator in its documentation
2015-09-10 14:55:22 +02:00
eksperimental cf6747c4f5 Mention the Pin Operator in its documentation 2015-09-10 19:41:49 +07:00
José Valim 4bea1ae628 Merge pull request #3700 from eksperimental/string_strip
String.*strip: mention that ALL leading/trailing `char`s will be removed
2015-09-10 11:55:31 +02:00
José Valim 5ef57375f1 Merge pull request #3701 from eksperimental/enum_default
Enum: renamed the rarely used `ifnone` argument, in favour of `default`
2015-09-10 11:55:04 +02:00
eksperimental 8b59aa823f Enum: renamed the rarely used ifnone argument, in favour of default 2015-09-10 09:53:49 +07:00
eksperimental 0c946b624c String: strip functions : mention that ALL leading/trailing chars will be removed 2015-09-09 23:40:22 +07:00
Gustavo Saiani b2790e9e48 Fix responsible to keep → responsible for keeping in env.ex doc 2015-09-09 08:42:37 -03:00
José Valim 8ca5758414 Merge pull request #3694 from eksperimental/corrections2
Use Title Case and backticks for Erlang and Elixir applications
2015-09-08 23:11:07 +02:00
eksperimental 7b2fa9192a 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"
2015-09-09 01:51:22 +07:00
eksperimental f2074a9065 Correct descriptions in docs to use Present Continuous (2)
Corrects a few more cases that were not caught by the previous PR
https://github.com/elixir-lang/elixir/pull/3682

Command:

  ignore_words="a|an|the|in|exception|helper|callback|front-end|same|when|where|what|functionality|elixir|erlang|eex|iex|logger|environment|module|similar|\w+-like|opposite|boolean|current|information|basic|public|if|unless|otherwise|regular|internal|convenience|given|welcome to|shortcut to|writable|user|system|low-level|pipe operator|supervisor|administrator"
  ag "(@(module|short)?doc)\s+(~[Ss])?([\"']{3})(\r|\n|.)\s*+((?!((?i)${ignore_words}(?-i)))[\w'-]+)(?<!(s))(?<!(ed))(?<!(ity))(?<!(ally))(?<!(ily))(?<!(ely))(?=[\s\r\n,:.])"
2015-09-09 00:13:32 +07:00
José Valim 7dd1c9df5b Merge pull request #3691 from eksperimental/erlang_function_urls
Add text to all links
2015-09-08 19:00:51 +02:00
eksperimental 06d94f5b90 Add text to all links
This commits covers 100% of all links in the documentation,
using a words to describe what the page is about.

It users the `:module.function/arity` format for erlang functions that
link to the earlang docs.

I also changed some of the sentnces using the link from
- See [:erlang.function/2](http://...) for a list of available options.

to
- For a list of available options, see [:erlang.function/2](http://...)

The reasoning behind is that I think it's better to have an link at the end of the sentence
and not in the middle, so the reades doesn't need to finish the sentence to know what is it about and go back
and find the link. This way all the information is given before the link, so the users stops reading and can
click directly.
2015-09-08 23:16:14 +07:00
Gustavo Saiani f8602490ef Fix does → do verbal agreement in special_forms.ex 2015-09-08 12:25:51 -03:00
José Valim 4e4aa7a2c5 Provide a best practices section for use 2015-09-08 10:54:35 +02:00
José Valim 3c145b7f93 Merge pull request #3687 from eksperimental/correct_arity
Add/Correct arity in functions that are not being linked in html docs
2015-09-07 21:06:18 +02:00
eksperimental 8f0175fd98 Add arity or correct it for functions that are not being linked in the html docs
original issue: https://github.com/elixir-lang/ex_doc/issues/321

I created a shell script that checks for anything references to Modules that are not actually linked
http://git.io/check_not_linked_exdoc.sh

You can see the output here:
https://gist.github.com/eksperimental/6dc9bce36710a3c8b1d9

I will update the script to work with regular elixir projects, so it can be used by other projects
2015-09-08 01:47:15 +07:00
eksperimental a251ccc722 Format raise message consistently
Kernel.raise messages should not start with uppercase, and should not
have trailing punctuation.

Mix.raise messages should start with uppercase, and should not have a trailing
puntuation.

    # starting with uppercase
    # exclude (Mix.raise, and any message that starts with all uppecase such as: I or IO
    ag '(?<!Mix\.)raise\s+\"+(?!([A-Z]+\b))[A-Z]'

    # Mix.raise should start with upper case
    # except when `mix` or `rebar` are mentioned
    ag 'Mix\.raise\s+\"(?!(mix|rebar))+[a-z]'

    # ending in period
    ag "raise\s+\"+.+\.\"\s*\n"
2015-09-08 00:44:17 +07:00
eksperimental c79d63f7c1 Correct spaces in iex>
It also removes the comment with doble ##,
So we can validate faulty indentation in iex>, ...>, ##  with command:

    # only 0, 2, 6, 10 spaces is valid for iex>, ...>, ##
    ag "^(\ {1}|\ {3,5}|\ {7,9}|\ {11,100})(iex>|\.\.\.>|##)" --ignore "*.sh" --ignore "*.md" --ignore "lib/ex_unit/test/ex_unit/doc_test_test.exs"
2015-09-07 23:28:30 +07:00
eksperimental ef986d2a18 correct wording 2015-09-07 22:31:37 +07:00
eksperimental d629b540f9 Add backticks to true, false, nil
just an update to https://github.com/elixir-lang/elixir/pull/3207

Command to detect missing backticks:

    ag '^(?-m)[^\"\%\#\n]*\W(?m)(is|are|was|were|to|or|and|nor|when|returns?|defaults?|otherwise|\.)\s+(?-i)(true|false|nil)\W(?-m)'
2015-09-07 22:29:36 +07:00
José Valim 0572d8e82e Merge pull request #3682 from eksperimental/doc_verb_tense
Correct descriptions in docs to use Present Continuous
2015-09-07 13:58:07 +02:00
eksperimental 8d5c009b13 Correct descriptions in @doc, @moduledoc, @shortdoc to use Present Continuous
It makes it consistent with the rest of the docs.

I have just looked for the first line in @doc, @moduledoc, so lines bellow it may still need
to be corrected.

@shortdoc all have been corrected.

Inspired by: https://github.com/elixir-lang/elixir/pull/2942

Command to list the first lines:

```sh
  # first line in @moduledoc / @doc
  ag '(@(module)?doc)\s+("{3})(\r|\n|.)\s*+[\w-]+(?<!s)\b'

  # also @shortdoc
  ag '(@shortdoc)\s+("{1,3})(\r|\n|.)\s*+[\w-]+(?<!s)\b'
```
2015-09-07 18:40:58 +07:00
José Valim d4bc95e542 Merge pull request #3678 from eksperimental/indefinit_article
Correct indefinite article a/an
2015-09-07 13:29:08 +02:00
José Valim 2ae5959ae7 Merge pull request #3680 from eksperimental/unnamed_arguments
Regex.regex?/1: name unnamed argument and improve docs
2015-09-07 13:28:50 +02:00
eksperimental aeb3e82918 Correct indefinite article a/an
Run the following command, and reviewed the occurences one by one.

 # find words starting with vowels
 ag -i '\ban?\s+[aeiou]\w+\b'

 # find acronyms
 ag '\ban?\s+[BCDFGHJKLMNPQRSTVWXYZ][A-Z]+\b'

 # starting with "h"
 ag -i '\ban?\s+[aeiou]\w+\b'
2015-09-07 18:26:51 +07:00
eksperimental 3180d9f955 Regex.regex?/1: name unnamed argument and improve docs 2015-09-07 17:27:25 +07:00
eksperimental b8c032201b Correct double words
Also change some wording in process.ex
2015-09-07 17:25:26 +07:00
José Valim 4bb4e916fd Convert remaining test :atom to strings 2015-09-05 20:35:26 +02:00
José Valim 59cd1f169f Merge pull request #3673 from aforward/f/File.rename
F/file.rename
2015-09-05 20:35:15 +02:00
aforward 5d7a7ec7f9 Add support for File.rename (unix-like mv) based on elrang specs 2015-09-05 08:09:13 -04:00
aforward 6886994164 Fix typo in File.cp_r for files (rename tmp to b.txt) 2015-09-05 06:53:17 -04:00
José Valim 6cf1dcbfe4 Prune more elixir internals in stacktraces 2015-09-05 10:24:27 +02:00
José Valim 7e27cbbe1d Properly convert captures in Macro.to_string/1 2015-09-04 13:35:35 +02:00
José Valim 3d316c13d7 Update b/1 helper for callback docs 2015-09-04 13:20:08 +02:00
José Valim ad869b8834 Merge pull request #3661 from fishcakez/gen_server_callbacks
Add and document GenServer/GenEvent callbacks
2015-09-04 10:55:17 +02:00
James Fish 86601650fe Add and document GenEvent callbacks 2015-09-04 00:34:22 +01:00
James Fish bf36c9d636 Improve Supervisor.start_link/2 spec 2015-09-04 00:06:33 +01:00
James Fish bd62f35745 Improve docs on GenServer.init/1 returning :ignore 2015-09-03 23:45:16 +01:00
James Fish f31c479e59 Add and document GenServer callbacks 2015-09-03 12:34:33 +01:00
Josh Adams 66fbae2480 Remove reference to GenServer.Behaviour from LocalsTracker 2015-09-01 19:29:19 -05:00
José Valim f268a3d7b3 Add Stream.transform/4 2015-09-01 12:37:23 +02:00
José Valim 9b34a31f96 Fix typespecs for Stream.chunk 2015-09-01 11:39:01 +02:00
José Valim 25f451ec16 Ensure we don't warn on missing imports if nothing was imported
Closes #3625
2015-09-01 10:29:54 +02:00
José Valim c838bcd3cb Improve unexpected token error messages 2015-09-01 00:32:46 +02:00
José Valim ab00a502bc Forward all info values to get_module_info 2015-08-31 21:03:52 +02:00
José Valim 4a1a9bc611 Merge pull request #3639 from augiedb/patch-2
Add missing character in delete_at code sample
2015-08-31 11:02:13 +02:00
eksperimental 53b25b34f6 Enum.chunk: correct types in specs 2015-08-31 12:26:23 +07:00
Augie De Blieck Jr. 0a7bbaf439 Add missing character in delete_at code sample
The delete_at code sample has an "iex" missing the ">" right afterwards . Wasn't sure if that might throw off some doctests or not, so better to be safe than sorry.
2015-08-30 22:56:31 -04:00
Matteo Giachino 10c398d58e added docs for :keep option in OptionParser module 2015-08-30 11:31:24 +02:00