Commit Graph
6903 Commits
Author SHA1 Message Date
José Valim b24a7a0fda Clarify supervisor docs 2017-10-25 12:04:40 +02:00
José Valim 703e3000a6 Remove end column information from tokens
If we want to store this information, we need to store it
alongside the end line, otherwise it is ambiguous.
2017-10-25 11:56:31 +02:00
José Valim 292a14466d Support columns: true in string_to_quoted, closes #3554 2017-10-25 11:02:53 +02:00
José Valim 47ca7004b6 Avoid conflicts with erl_anno in meta
We avoid using :file publicly as well as :location privately.
We do still use :file privately but that's supposed to mirror
the `-file` annotation in Erlang before function definitions.
2017-10-25 00:33:05 +02:00
José Valim 171a849c8a Also mention you may want to start an application manually 2017-10-24 16:46:17 +02:00
José Valim 8152436235 Improve fetch_env error message 2017-10-24 16:44:06 +02:00
José Valim e8ea15b4a4 Run the formatter in the formatter and remove code duplication 2017-10-24 14:16:38 +02:00
José Valim d0e496d6f5 Recognize hashbangs in the formatter
Those are known instructions in UNIX systems.

Closes #6969.
2017-10-24 14:00:10 +02:00
José Valim c36ee56cc7 More docs for inspect algebra 2017-10-23 22:43:43 +02:00
José Valim 3eccd91f59 Simplify the condition for implementing count 2017-10-23 21:12:40 +02:00
Gustavo Saiani 85b72fb381 Fix backtick position in Enum doc (#6965) 2017-10-23 14:04:33 +02:00
José Valim 5e668c2d7d Avoid warnings during bootstrapping 2017-10-22 01:48:56 +02:00
José Valim df8bca004a Improve optional callback checks 2017-10-22 01:48:00 +02:00
José Valim aad66f22bc Move all remaining behaviour usage warnings to Elixir 2017-10-22 00:59:11 +02:00
Alexis Brodeur 18f723541c Perform some behaviour lint checks in Elixir (#6841) 2017-10-21 23:35:15 +02:00
Cẩm Huỳnh 7146c6666c Avoid shadowing in Stream.do_reduce (#6962) 2017-10-21 23:33:09 +02:00
José Valim 17a59905b2 Format expansion_test.exs 2017-10-21 20:56:13 +02:00
José Valim f130cb9c84 Improve warnings during expansion 2017-10-21 20:43:35 +02:00
José Valim 23eb3ef089 Add Enumerable.slice/1 and use it in Enum (#6958)
We have reimplemented Enum.at/3, Enum.fetch/2, Enum.fetch!/2,
Enum.random/1, Enum.slice/2, and Enum.slice/3 to be more
efficient by using the new protocol function.

This partially implements #6955. We have decided to not replace
`count/1` by an `aggregate/2` callback because it became clear
we cannot implement `min/1` for date ranges since `Enum.min/1`
does a structural comparison. Given ranges are still the only case
that requires custom aggregations, we have decided to inline those
in Enum until we have more evidence that such callback is necessary.
2017-10-21 16:17:04 +02:00
Glauber Campinho f3acc14fb5 Add file information to the dispatches on the source manifests (#6954) 2017-10-21 11:53:06 +02:00
Pedro Medeiros 0dc899df43 Format @spec with map literal with multi keys
Signed-off-by: José Valim <jose.valim@plataformatec.com.br>
2017-10-19 18:32:04 +02:00
José Valim 499c153c0d Ensure left side of | in maps has parens when necessary 2017-10-19 18:29:13 +02:00
James Edward Gray II 1127f69c35 Updating what seems to be outdated documentation. (#6949) 2017-10-17 21:07:07 -07:00
José Valim 185fdd5f57 Always match on date calendar 2017-10-18 00:10:32 +02:00
José Valim 115bb08f51 Deprecate Range.range? in favor of pattern matching 2017-10-17 19:54:03 +02:00
José Valim db119e7d0d Tidy up code layout in Date.Range 2017-10-17 19:54:03 +02:00
Andrea Leopardi b5211deec0 Fix a bug where we discarded some meta in some literals in the parser (#6946)
Closes #6945.
2017-10-17 17:31:48 +02:00
José Valim 62ce847763 Simplify rules for & with binary operators
Closes #6923.
2017-10-16 18:10:56 +02:00
José Valim 24931c539b Fix tokenizer tests 2017-10-16 17:11:23 +02:00
José Valim a16283a4cf More examples in the formatter 2017-10-16 17:00:19 +02:00
José Valim 01cd27393e Keep integer/float underscores in the formatter, closes #6931 2017-10-16 16:44:53 +02:00
José Valim b40a79d97a Do not allow interpolation in formatter docs 2017-10-15 17:59:05 +02:00
José Valim 0e9fe76581 Improve formatter docs 2017-10-15 17:51:54 +02:00
José Valim d475c8c286 Do not pass :in_memory to load_binary
Erlang's typespecs define only cover_compiled and preloaded
as valid atoms and uses an empty list for generated code.
So we should follow Erlang's rules until we can officially
relax them.
2017-10-14 23:19:32 +02:00
Marcin Szczepaniak df41a3e1cc Update default implementation in docs (#6928) 2017-10-13 20:57:16 +02:00
José Valim 4ce24f7671 Add more docs to the formatter 2017-10-12 11:45:38 +02:00
José Valim 782a4a59c3 Formatter should not fail on empty clauses, closes #6924 2017-10-12 11:30:41 +02:00
José Valim dbc38a581f Check files are formatted on CI 2017-10-12 09:41:06 +02:00
José Valim a33cbcd32a Format errors_test.exs 2017-10-12 09:35:58 +02:00
José Valim 7578660c60 Fixes to previously formatted files 2017-10-12 09:01:21 +02:00
Uday Singh f2633d8d61 Run code formatter on lib/elixir/lib/module.ex (#6846) 2017-10-12 08:49:09 +02:00
Andrea Leopardi 23e563db43 Run the code formatter on Inspect.Algebra 2017-10-12 00:50:08 +02:00
Andrea Leopardi ba1530c895 Run the code formatter on Kernel.QuoteTest 2017-10-12 00:48:43 +02:00
Andrea Leopardi b26666b8fd Run the code formatter on MacroTest 2017-10-12 00:41:04 +02:00
Andrea Leopardi 6337dbdf42 WIP 2017-10-12 00:40:21 +02:00
Eric Meadows-Jönsson 1e80f54a83 Run code formatter on Code.Formatter.GeneralTest 2017-10-11 23:49:41 +02:00
Eric Meadows-Jönsson 3931645f2f Run code formatter on RegistryTest 2017-10-11 23:49:41 +02:00
José Valim f597fa23b0 Format archive_test and inspect_test 2017-10-11 23:33:32 +02:00
José Valim 6250eef541 Format more pending files 2017-10-11 23:29:06 +02:00
José Valim 9fadbfc87a Format more pending files 2017-10-11 23:15:03 +02:00