Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change
AllowAdjacentOneLineDefs
config parameter of `Layout/EmptyLi…
…neBetweenDefs` to `true` by default This PR changes `AllowAdjacentOneLineDefs` config parameter of `Layout/EmptyLineBetweenDefs` to `true` by default. Currently, warnings that occur are different for each type of definition grouped as shown below. ```console % cat example.rb class FooError < StandardError; end class BarError < StandardError; end class BazError < StandardError; end attr_accessor :foo attr_accessor :bar attr_accessor :baz before_action :do_foo before_action :do_bar before_action :do_baz ``` ```console % bundle exec rubocop (snip) Inspecting 1 file C Offenses: example.rb:1:1: C: [Correctable] Style/FrozenStringLiteralComment: Missing frozen string literal comment. class FooError < StandardError; end ^ example.rb:2:1: C: [Correctable] Layout/EmptyLineBetweenDefs: Expected 1 empty line between class definitions; found 0. class BarError < StandardError; end ^^^^^^^^^^^^^^ example.rb:3:1: C: [Correctable] Layout/EmptyLineBetweenDefs: Expected 1 empty line between class definitions; found 0. class BazError < StandardError; end ^^^^^^^^^^^^^^ 1 file inspected, 3 offenses detected, 3 offenses auto-correctable ``` This `AllowAdjacentOneLineDefs: true` makes it consistent so that there are no blank lines when grouped by one liner definitions.
- Loading branch information