Skip to content
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

Fix errors with out of date comma cops #298

Conversation

NickLaMuro
Copy link
Member

This prevents rubocop from running properly.

Error in question:

Error: The `Style/TrailingCommaInLiteral` cop no longer exists. Please use `Style/TrailingCommaInArrayLiteral` and/or `Style/TrailingCommaInHashLiteral` instead.
(obsolete configuration found in .rubocop-https---raw-githubusercontent-com-ManageIQ-guides-master--rubocop-base-yml, please update it)

Updated to use both cops to retain the same functionality.

Links

Error in question

    Error: The `Style/TrailingCommaInLiteral` cop no longer exists. Please use `Style/TrailingCommaInArrayLiteral` and/or `Style/TrailingCommaInHashLiteral` instead.
    (obsolete configuration found in .rubocop-https---raw-githubusercontent-com-ManageIQ-guides-master--rubocop-base-yml, please update it)

Updated to use both cops to retain the same functionality.
@NickLaMuro
Copy link
Member Author

@Fryguy and/or @bdunne I believe you are the resident "rubocop Czars" around here. I leave this to you.

Copy link
Member

@bdunne bdunne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are not compatible with our current version of rubocop.
https://github.com/ManageIQ/miq_bot/blob/master/Gemfile#L52
https://github.com/ManageIQ/manageiq/blob/master/Gemfile#L218

My bundle shows rubocop v0.52.1 and if I include this change, I see:

Warning: unrecognized cop Style/TrailingCommaInArrayLiteral found in .rubocop_local.yml
Warning: unrecognized cop Style/TrailingCommaInHashLiteral found in .rubocop_local.yml

Are you also suggesting updating the version of rubocop?

@NickLaMuro
Copy link
Member Author

NickLaMuro commented Mar 14, 2018

@bdunne you know what, I goofed, and I think this was on me.

tl; dr No, wasn't suggesting we upgrade. We can keep this around though if we decide to upgrade, though (since not having this change when you upgrade will prevent rubocop from running properly).

So, what I did wrong...

  • Missed that the change in the the CHANGELOG.md (second bullet) was in the v0.53.0 release, not v0.52.1.
  • Did a fresh bundle in my local linux_admin, which doesn't have a hard lock on the rubocop version, and started me at v.0.53.0.
  • Ran into the error from above, so tried downgrading to a known working version (v0.52.1)
  • Was running with just rubocop in both cases instead of bundle exec rubocop, which used the v0.53.0 release each time, and was showing the error.

So basically, I was thinking this was an issue on our bot because I recently helped upgrade that:

ManageIQ/miq_bot#410


Anyway, as mentioned, it is up to you I guess on what you want to do with this. Sorry for the PR based on user error 😖

@martinpovolny
Copy link
Member

@bdunne , @NickLaMuro : shall I close this one?

@Fryguy Fryguy closed this Jul 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants