All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- Chore: Added ruby 2.6.0 to CI test runs.
- Fix bug for double colon operator in method definition (issue #120)
- Fix Bug: Rufo breaks HEREDOC syntax. (issue #88). This fixes heredoc within parens formatting causing bad formatting and subsequent syntax error.
- Fix Bug: formatter.rb:3700:in
block in adjust_other_alignments': undefined method
[]' for nil:NilClass (NoMethodError) (issue #87). Check alignment target exists. - Fix Bug: Rufo keeps switching formatting on same file every time it runs (issue #86). Avoids re-indenting nested literal indents.
- Allow for simpler else_body node to suit new Ripper style in 2.6.0
- Allow new Ripper node :excessed_comma in block parsing
- Allow :bodystmt in lambda nodes to suit Ripper format in 2.6.0
- Drop support for ruby 2.2
- Set minimum required ruby version. As rufo is not tested on unsupported versions it may (and is known to) break code.
- Fix
quote_style
config not being respected (issue #95).
- Added Idempotency check to source_specs/ tester.
- Normalize string quotes according to quote_style, which defaults to :double.
- Fix printing of extraneous trailing semicolons from inline classes, modules, methods (issue #59)
- Fix unhandled white space between array getter/setters
x[0] [0]
(issue #62) - Fix comma printing for heredocs when inside a hash (issue #61)
- Fix array literals against changes to Ruby 2.5.0
Config parsing and handling:
- No longer using
eval
to parse config files - Warnings have been added for invalid config keys and values
The default for the following options has changed:
- parens_in_def:
:dynamic
>:yes
- trailing_commas:
:dynamic
>true
Valid options for:
- trailing_commas:
[:always, :never]
>[true, false]
The following configuration options have been removed, and replaced with non-configurable sane defaults, per discussion:
- align_assignments
- align_comments
- align_hash_keys
- indent_size
- spaces_after_comma
- spaces_after_lambda_arrow
- spaces_around_block_brace
- spaces_around_dot
- spaces_around_equal
- spaces_around_hash_arrow
- spaces_around_unary
- spaces_around_when
- spaces_in_commands
- spaces_in_suffix
- spaces_in_ternary
- spaces_inside_array_bracket
- spaces_inside_hash_brace
- visibility_indent
- double_newline_inside_type
- spaces_around_binary
- Fix crash in Ruby <= 2.3.4, <= 2.4.1 in the presence of certain squiggly doc (
<<~
) with multiple embedded expressions. The real fix here is to upgrade Ruby to >= 2.3.5 / >= 2.4.2 - Fix dedent bug and bad formatting caused by comments within chained calls (issue #49)
- Fix formatting bug for
for i, in [[1, 2]] ; x ; end
(issue #45)
Beginning of logging changes!