Commit Graph
9477 Commits
Author SHA1 Message Date
José Valim 21ff94de1f Only warn if no test pattern matches due to umbrella apps 2015-09-11 11:48:11 +02:00
José Valim 6a1c7fa375 Update CHANGELOG 2015-09-11 11:27:06 +02:00
José Valim f6a681c3eb Ensure binding() doesn't warn on underscored vars, closes #3708 2015-09-11 11:25:27 +02:00
José Valim 38a2520809 Only warn apps that come from the current project stack, closes #3710 2015-09-11 11:06:46 +02:00
José Valim 74048fa76f Set ex_unit stacktrace to 20 by default, closes #3705 2015-09-11 10:48:39 +02:00
José Valim 5d26dc9301 Improve assert docs, closes #3709 2015-09-11 10:29:47 +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
José Valim 495338fbc1 Merge pull request #3698 from gusaiani/fix/verb-usage-in-env-ex
Fix `responsible to keep` → `responsible for keeping` in env.ex doc
2015-09-09 14:20:37 +02: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 f858ccf205 Use Mix.shell.error for fprof warning 2015-09-09 09:23:59 +02:00
José Valim eee9c636f7 Update CHANGELOG 2015-09-09 08:25:55 +02: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
José Valim 3100f6831b Merge pull request #3693 from eksperimental/doc_verb_tense2
Correct descriptions in docs to use Present Continuous (2)
2015-09-08 20:18:05 +02: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
José Valim 5781b9d639 Merge pull request #3692 from eksperimental/md_files
Fix markdown files
2015-09-08 18:36:54 +02:00
eksperimental dcc7e4586f Fix markdown files
Corrects the indentation,
and change `bash` code blocks  to a more generic one: `sh`
2015-09-08 23:25:47 +07: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
José Valim f3d752c3bd Merge pull request #3690 from gusaiani/fix/special-forms-verb
Fix `does` → `do` verbal agreement in special_forms.ex
2015-09-08 17:31:58 +02:00
Gustavo Saiani f8602490ef Fix does → do verbal agreement in special_forms.ex 2015-09-08 12:25:51 -03:00
José Valim 77fd45164d Do not choke on unknown manifest files 2015-09-08 13:27:44 +02:00
José Valim 4e4aa7a2c5 Provide a best practices section for use 2015-09-08 10:54:35 +02:00
José Valim 3419e0ddc4 Merge pull request #3689 from joshcrews/spelling_fix
spelling `miliseconds` -> `milliseconds`
2015-09-07 23:55:19 +02:00
Josh Crews d60b395403 spelling miliseconds -> milliseconds 2015-09-07 15:27:19 -05: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
José Valim 1660d7d5c9 Merge pull request #3686 from eksperimental/correct_raise
Format raise message consistently
2015-09-07 20:23:03 +02: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
José Valim b5322b1d10 Merge pull request #3685 from eksperimental/corrections
Corrections
2015-09-07 19:06:41 +02: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
eksperimental 9685064b33 Mix.Hex: improve documentation and code 2015-09-07 22:21:32 +07:00
eksperimental 8bd6a7848f ensure_structure: rephrase wordings 2015-09-07 22:08:37 +07:00
José Valim 8346bd280a Merge pull request #3683 from eksperimental/split_words
Avoid splitting words that use hyphen
2015-09-07 16:30:13 +02:00
eksperimental ca00f04089 Avoid splitting words that use hyphen
For the ones in the documentation, a space will be added in after the hyphen.
Just for consistency and to ease detection, I have replaced the ones in
comments as well.

Command to detect these lines:

    ag "\w+-\n"
2015-09-07 21:22:25 +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
José Valim c6ce93ae13 Merge pull request #3681 from eksperimental/double_words
Correct double words
2015-09-07 12:50:21 +02: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