Commit Graph
6920 Commits
Author SHA1 Message Date
Ben Olive 6f40fae504 Handle final sigma unicode exception
Signed-off-by: José Valim <jose.valim@plataformatec.com.br>
2017-10-30 18:45:16 +01:00
Eric Zhang 46dd155fc4 Raise when calling GenServer.stop/3 with current process (#6987) 2017-10-30 10:35:08 +01:00
José Valim 2731b1355f Consistently use GenServer API in Supervisor 2017-10-29 22:31:55 +01:00
Vahid Fazlollahzade d124b05b6c Document Enum.EmptyError exception for Enum.reduce/2 (#6986) 2017-10-28 15:40:25 +02:00
José Valim ef43b25f85 Restrict next break fits and eols on operators and function calls
* Whitelist which operators support next_break_fits
  * No longer consider tuples as part of next_break_fits
  * Do not consider eol for = and ::
  * Do not consider eol for calls with one next_break_fits arg
2017-10-27 12:34:09 +02:00
José Valim e26128a630 Discard malformed lines in metadata
Closes #6980.
2017-10-27 00:47:09 +02:00
Blake Tan 39d903ecf3 Better handling of non existing atoms (#6978) 2017-10-26 20:25:00 +02:00
José Valim e728d28537 Tidy up implementation detail section 2017-10-26 15:57:16 +02:00
Andrea Leopardi e8c7d48cf7 Fix formatting of multiline "foo.{...}" calls (#6979) 2017-10-26 13:59:37 +02:00
José Valim f0a74482da Respect the user's choice on calls
Closes #6977
2017-10-26 13:19:21 +02:00
José Valim 3fba28e0ee Treat => and : as operators in the formatter
This means that the right side will break on its own line
when it doesn't fit and be indented by two spaces.

Closes #6976.
2017-10-26 12:43:02 +02:00
José Valim 5e4bd77c63 Use flex when inspecting tuples
This aligns better with the formatter latest style
2017-10-26 10:46:27 +02:00
José Valim a815313750 Store the number of defaults in the definition Meta 2017-10-26 00:18:06 +02:00
José Valim aa79c52779 Pipe all the way in string 2017-10-25 19:58:03 +02:00
José Valim 015644ff4f Update codebase with latest formatter rules 2017-10-25 19:39:25 +02:00
José Valim f11a26dc70 Consistently add spaces after not 2017-10-25 19:38:56 +02:00
José Valim 6f02c12e46 Support next break fits inside tuples
This only applies if the tuple has not been "spaced out".
2017-10-25 19:36:34 +02:00
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