-
-
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
Layout/ArgumentAlignment vs Layout/HashAlignment #9490
Labels
Comments
8 tasks
koic
added a commit
to koic/rubocop
that referenced
this issue
Feb 3, 2021
…ntIndentation` Fixes rubocop#9490 and a regression of rubocop#9486. This PR fixes incorrect auto-correct for `Layout/FirstArgumentIndentation` when specifying `EnforcedStyle: with_fixed_indentation` of `Layout/ArgumentAlignment` and `EnforcedStyle: consistent` of `Layout/FirstArgumentIndentation`. And this resolves the following Standard gem build error when upgrading to RuboCop 1.9.1. ```console 2) Failure: Standard::CliTest#test_autocorrectable [/home/runner/work/standard/standard/test/standard/cli_test.rb:14]: --- expected +++ actual @@ -98,13 +98,13 @@ ``` https://github.com/testdouble/standard/runs/1805630903
bbatsov
pushed a commit
that referenced
this issue
Feb 4, 2021
…tation` Fixes #9490 and a regression of #9486. This PR fixes incorrect auto-correct for `Layout/FirstArgumentIndentation` when specifying `EnforcedStyle: with_fixed_indentation` of `Layout/ArgumentAlignment` and `EnforcedStyle: consistent` of `Layout/FirstArgumentIndentation`. And this resolves the following Standard gem build error when upgrading to RuboCop 1.9.1. ```console 2) Failure: Standard::CliTest#test_autocorrectable [/home/runner/work/standard/standard/test/standard/cli_test.rb:14]: --- expected +++ actual @@ -98,13 +98,13 @@ ``` https://github.com/testdouble/standard/runs/1805630903
This was referenced Mar 6, 2021
Closed
This was referenced Mar 15, 2021
This was referenced Mar 17, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi folks.
I found out odd rubocop behavior. in case when it fix alignments of method attributes
Looks. A just code example
My rubocop settings:
And that's it.
Rubocop is finding no issues.
Although It should change alignment of
a
,b
,c
arguments.Next, i changed the config:
And It found issues :
Layout/HashAlignment: Align the keys of a hash literal if they span more than one line
I usually use
-A
argument to fix their. So I got followed result:I suppose the alignment of attributes is wrong.
The text was updated successfully, but these errors were encountered: