Commit Graph
41 Commits
Author SHA1 Message Date
José Valim 939b64c211 Update CONTRIBUTING.md 2015-09-14 12:37:17 +02:00
José Valim 34cf7b4880 Improve wording in COC links 2015-09-14 10:50:58 +02:00
optikfluffel dad7e203e3 add links to code of conduct 2015-09-14 10:44:48 +02:00
eksperimental a624573757 Replace all occurrences of em-dashes in favour of hyphens 2015-09-11 19:47:24 +07:00
eksperimental ed5671b4f8 Standardize use of backticks and quotes; including Error messages and Title Case commands
This is a large commit that does the following:
* Removes backticks from messages and comments.
  All references to backticks have been replaced with double quotes everywhere the
  code is not interpreted as Markdown, (ie. anywhere outside documentation and
  markdown files, such as in code comments, or error messages).

* Variables in Exception messages are printed using `inspect`
  The way no-matching error message are printed, have changed because now we use inspect for printing
  variables. The following file and their respective test have been changed:
  - lib/elixir/lib/exception.ex
  - lib/elixir/lib/inspect/algebra.ex
  - lib/elixir/test/elixir/inspect_test.exs
  - lib/ex_unit/test/ex_unit/formatter_test.exs
  - lib/elixir/test/elixir/exception_test.exs

* Properly use Title Case for Mix, Git, Dializer

* Use backticks when citing a command

****************************************************
CONVENTION FOR RENAMING USING BACKTICKS AND QUOTES

https://github.com/elixir-lang/elixir/pull/3697#issuecomment-138811747

1. Backticks should never be printed in error messages, neither be included anywhere where Markdown code is not interpreted as such.

2. Do not use single quotes anywhere. We should favor double quotes everywhere, to avoid confusion

3. If you want to format something in error messages, use inspect. For example, if you want to show the dependency name and that is an atom, instead of the dependency "foo", let's show the dependency :foo. Less noise and may click better

4. Similarly, if you want to show something with double quotes, call inspect, as it handles escaping as well as the quotes

5. Things like "--all" just add verbosity, we can definitely read --all without ambiguity.

6. When using switches with a single hyphen (such as "-o"), we can make it explicit in the text: e.g. "... give the switch -o when choosing ..."

****************************************************
SHELL COMMANDS TO DETECT CODE BREAKING THE RULES

* Detect values surrounded by single-quotes where we want double-quotes.

    # regular variables
    ag "'#{"
    # constants or ENV variables
    ag "'[A-Z][A-Z0-9_-]+"
    # switches
    ag -i "(?<!(\[))'--?[a-z0-9][a-z0-9_-]+'"
    # atoms
    ag -i "(?<!(\[))':[a-z0-9][a-z0-9_-]+'"

    # DETECT BACKTICKS OUTSIDE DOCS
    ag "^\s+(?<!(#))#[^#\r\n]*\`" --ignore "*.md"
    ag '^\s+["%].*`' --ignore "*.md"
    ag -s '(raise|Error)\b(?!(`|/)).*\`'

* Spot mentions to running a command that is not using backticks:

    commands="elixir|elixirc|mix|iex|ex_doc|git|make|rebar|dialyzer|erl|rm|cd|mkdir|rmdir|ln|ls|pwd"
    actions="runs?|running|executes?|executing|types?|typing|enters?|entering|calls?|calling"
    ag '(?i)('${actions}')(?-i)\b[^`\r\n/]+[\ \t]+(?!(`))('${commands}')'
    ag '(?-i)\b(?!(`))('${commands}')[\ \t]+[^`\r\n/]+(?i)(commands?)'

* Spot where a command is mentioned:

    #commands="erlang|elixir|eex|iex|ex_unit|ex_doc|logger|elixirc|git|make|rebar|dialyzer|erl|rm|cd|mkdir|rmdir|ln|ls|pwd"
    commands="mix|elixirc|git|make|rebar|dialyzer|erl|rm|cd|mkdir|rmdir|ln|ls|pwd"
    ag -s '(?<!(\`))(?<!(\.))(?<!(/))(?<!(:))(?<!(_))\b('${commands}')\b(?!(:))(?!(\?))(?!(_))(?!(-))(?!(\.))(?!(\`))(?!(/))(?!(>))' \
    --ignore "*.erl" --ignore "*.yrl" --ignore "*.src"
2015-09-11 18:49:51 +07: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 7dd1c9df5b Merge pull request #3691 from eksperimental/erlang_function_urls
Add text to all links
2015-09-08 19:00:51 +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
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 a4937f2f92 Update CONTRIBUTING.md to avoid code style pull requests 2015-07-15 13:59:47 +02:00
eksperimental 51767139d4 update links to https. remove period adjacent to URLs. 2015-07-13 22:27:36 +07:00
eksperimental b384d89773 link to search issues 2015-07-12 22:18:26 +07:00
eksperimental cf41811462 add backticks to a massive amount of true, false and nil 2015-03-26 13:21:13 +07:00
Takayuki Matsubara eedcb816d2 fix typo 2014-10-28 22:31:49 +09:00
eksperimental 131329544d explaining #elixir-lang (better option)
i like this one better
2014-10-19 21:16:49 +08:00
eksperimental af70205be1 explaining #elixir-lang
the markdown parser doesn't recognize the irc:// link, so it's not clear what #elixir-lang is. (it actually looks more like a twitter hashtag)
2014-10-19 21:14:06 +08:00
eksperimental 240c432f25 fix link to bug reports 2014-10-19 20:52:58 +08:00
Kosmas Chatzimichalis 07467a733b Update CONTRIBUTING.md
Corrected 'should be send' to 'should be sent'
2014-08-21 11:34:34 +02:00
Kosmas Chatzimichalis 538c717ded Update CONTRIBUTING.md
renamed 'issues tracker' to 'issue tracker' for consistency
2014-08-20 14:54:50 +02:00
Chris Hyndman 29ebbeda93 Remove Windows-related CONTRIBUTING.md section (now in Wiki) 2014-08-04 15:14:02 -07:00
José Valim ba2e1c95ef Remove duplicated specs and old PR example 2014-06-30 10:17:31 +02:00
Chris Hyndman 29f05fda35 Add extra Path directory, remove PowerShell warning 2014-06-20 10:09:55 -07:00
chyndman 69098968be qualify that PowerShell doesn't work yet 2014-05-28 11:40:09 -07:00
chyndman 01d5f99437 Instructions for contribution from Windows (first draft) 2014-05-24 23:03:08 -07:00
José Valim 23b0c8c5b1 Improve contributing guide 2014-05-10 16:57:28 +02:00
José Valim dc768eb501 Convert File.Stat to a struct 2014-04-29 17:59:36 +02:00
José Valim 5f1e5ebc5f Update record docs style 2013-08-27 07:16:25 -03:00
Peter Minten c555bf934b Add bit about documentation style to CONTRIBUTING 2013-08-27 11:27:19 +02:00
José Valim fb5c67bf99 Update CONTRIBUTING.md
Feature requests should be discussed over the core mailing list.
2013-07-30 09:03:41 +02:00
Jordi Carres 474d4f6532 when contributing it is important to run the tests 2013-06-30 18:59:45 +09:00
José Valim 6ce77b1b49 Update CONTRIBUTING.md language 2013-06-16 10:07:35 +02:00
José Valim 336b9cf126 Update mailing list links 2013-05-26 21:02:29 +02:00
Alexei Sholik b1fa7d1834 "Thank you" sounds better 2013-05-26 20:34:20 +03:00
Alexei Sholik 6a0244bd88 Be more strict about changes in master 2013-05-26 20:33:45 +03:00
Alexei Sholik f37e5c6246 Update pull request creation guidelines 2013-05-26 20:30:53 +03:00
Alexei Sholik 96a431945d Don't mention the project owner, this is open source 2013-05-26 20:30:38 +03:00
José Valim 1bf4d053b9 Use level two headings when appripriate 2013-05-15 12:04:41 -06:00
José Valim b81bf4a839 Add some sample pull requests 2013-05-15 12:01:22 -06:00
José Valim 06f1f3ccd7 Improvements to contributing guide 2013-05-15 11:41:12 -06:00
Devin Torres 975d7f8dfb Add a CONTRIBUTING.md 2013-05-06 10:17:46 -05:00