Skip to content

Releases: WhatsApp/erlfmt

Tuples that are not tagged tuples are formatted as lists

30 Mar 08:04
17b8d55
Compare
Choose a tag to compare

Enhancements

  • Break untagged tuples #259
  • rewrite some binary operators using associativity #262 #264 #265
  • next break fits for dolon #246

Fixes

  • double indent pattern matches in clauses #247
  • fix parsing of bad records #261

Support macros in type and spec names

10 Mar 10:14
5f948b5
Compare
Choose a tag to compare

Enhancements

  • Added shorthand -i for --insert-pragma #256

Fixes

  • Support macros in type and spec names #254

List comprehensions revisited

12 Feb 14:19
15a2704
Compare
Choose a tag to compare

Enhancements

  • Updated formatting for list comprehensions #249
  • preserve newline after's arrow #245
  • preserve newlines after equal #248

Preserve a single empty line between attributes

22 Jan 12:39
e1745a9
Compare
Choose a tag to compare

Enhancements

  • Preserve a single empty line between attributes #239
  • Only write to file the formatted code when it is different to the current one #235
  • Export the format_nodes function for symmetry with read_nodes function.

Fixes

  • no newline after spec #224
  • preserve breaks after dolon #225
  • fix: Crash formatting qlc_SUITE in OTP #240
  • Preserve newlines between separated guards #241
  • Adjust AST for try clauses such that they do not move comments around #242

Default files and exclude_files option

04 Nov 17:22
e994fac
Compare
Choose a tag to compare

Enhancements

  • Provide default value for --files when none is provided #204
  • Add --exclude-files flag to manually exclude some files from the formatter #213
  • Warn on overly long lines, given --verbose flag #209

Fixes

  • Comments below shebang are pull upwards to support emulator args #207
  • Bind Pipe Tighter in parser #206
  • Fix record field type end location in parser #201
  • Properly handle comments inside concats #216
  • Properly handle trailing comments followed by post-comments #217
  • Preserve comments inside fun type arg list #218

Better rebar integration

07 Oct 09:19
Compare
Choose a tag to compare

Enhancements

Fixes

  • Parse attributes with empty parens #189
  • Do not crash with comments before a dot #184
  • Do not crash with post comments in catch #195

--check CLI option

17 Sep 11:51
Compare
Choose a tag to compare

--check flag now provides exit code 1, if files are not formatted.

Enhancements

Bug fixes

  • Preserve newline in list & binary comprehensions #116
  • Preserve new lines in guards and specs #115
  • Make multi-line tuples & binaries next-break-fits #117
  • Use deterministic compiler option for releasing precompiled escript #127
  • Do not crash when formatting an empty file #130
  • Relax map syntax #137
  • Support macros with parens in concat #138

Configurable print-width and erlfmt-ignore comment

18 Aug 14:32
Compare
Choose a tag to compare

Enhancements

  • print-width is now configurable as a command line parameter #99
  • % erlfmt-ignore comment ignores the next form and does not format it #98
  • files are now formatted in parallel #101

Bug fixes

  • Preserve empty lines around if-like attributes #97
  • Don't break multiple clauses with comments #96
  • Make try and after always introduce a newline #107
  • Do not preserve operator newline with a next break fits expression #104
  • New format for multiline fun types #110

0.5.1

05 Aug 13:51
Compare
Choose a tag to compare

v0.5.1 (05.08.2020)

Bug fixes

  • correctly handle type unions inside of multiline containers (such as specs) #90

--insert-pragma CLI option

05 Aug 10:21
Compare
Choose a tag to compare

v0.5.0 (05.08.2020)

Enhancements

  • new --insert-pragma CLI option adds the @format pragma to all the formatted
    files that didn't have it before #75
  • preserve empty lines in containers #83

Bug fixes

  • correctly handle .script files like rebar.config.script #79
  • export_type is formatted the same as export #86
  • print type unions either all on single line or each type separated by
    | on a separate line #84