-
Notifications
You must be signed in to change notification settings - Fork 6
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/HashAlignment: Allow both key and table styles #77
Conversation
Codecov Report
@@ Coverage Diff @@
## master #77 +/- ##
=======================================
Coverage 27.86% 27.86%
=======================================
Files 2 2
Lines 61 61
=======================================
Hits 17 17
Misses 44 44 Continue to review full report at Codecov.
|
is that the old or the new style? |
The new, rubocop is currently auto-correcting to: {
"foo" => "bar",
"forbar" => "bar"
} |
I do agree we need something for this because it's making huge changes in some modules for (IMHO) no benefit. I'd like a consistent style, whether it's the old or new. Just as long as it doesn't mix styles. Reading https://www.rubydoc.info/gems/rubocop/0.83.0/RuboCop/Cop/Layout/HashAlignment it said:
Do we have a module where we can test if this works? |
Sorry, I completely forgot about this PR. I added so both key and table styles are allowed. I think that's the most used styles. separator seems a little bit weird. I will test this on puppet-example module |
Tested here: voxpupuli/puppet-example#21 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
In the latest modulesync rubocop was auto-correcting:
to
Generally in the puppet world we are used to align to the => and a lot of specs are written this way (and I think it's better to stay this way)