-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new Layout/EmptyLinesAroundArguments
Cop
#5074
Comments
This cop should go in the |
Style/EmptyLinesAroundArguments
CopLayout/EmptyLinesAroundArguments
Cop
Hm, it seems this doesn't work properly. I have something like # frozen_string_literal: true
require 'csv'
require_relative '../../importer/base'
module Labels
module Csv
class Import < Importer::Base And that issue occurs on
I guess this is not expected behaviour... |
We also got this cop triggered on a |
I also had this cop offense in this example.
|
While applying a fix for issue #5052 in PR #5066 , it was discovered that the autocorrection for
Style/BracesArondHashParameters
is a little aggressive. When I applied changes to stop it from removing legitimate\n
s, it created snippets similar to the example below.Adding this
EmptyLine
Cop would resolve this scenario and still allowStyle/BracesArondHashParameters
autocorrection to be improved to cleaner results. The cleaner results I refer to our found in this example, this example and this example.Desired behavior
For this code snippet register a
Stlye/EmptyLinesAroundArguments
offense.Then, autocorrect that snippet to:
Actual behavior
Above snippet registers no offense.
Steps to reproduce the problem
See above.
RuboCop version
The text was updated successfully, but these errors were encountered: