Plots2: Fix Rubocop performance deprecation warning

Created on 26 May 2019  ยท  14Comments  ยท  Source: publiclab/plots2

๐Ÿค” What you will need to know.

Nothing. This issue is meant to welcome you to Open Source :) We are happy to walk you through the process.

๐Ÿ“‹ Step by Step

  • [ ] ๐Ÿ™‹ Claim this issue: Comment below. If someone else has claimed it, ask if they've opened a pull request already and if they're stuck -- maybe you can help them solve a problem or move it along!

Problem:

Performance cops have been removed from RuboCop 0.68

๐Ÿ“ Update:

Put this in Gemfile.

gem 'rubocop-performance'

Then add this in .rubocop.yml.

require: rubocop-performance

After changing run bundle install

  • [ ] ๐Ÿ’พ Commit your changes

  • [ ] ๐Ÿ”€ Start a Pull Request. There are two ways how you can start a pull request:

  1. If you are familiar with the terminal or would like to learn it, here is a great tutorial on how to send a pull request using the terminal.

  2. You can also edit files directly in your browser and open a pull request from there.

  • [ ] ๐Ÿ Done Ask in comments for a review :)

๐Ÿค”โ“ Questions?

Leave a comment below!

first-timers-only

Most helpful comment

Hey, I'm a first time user of GitHub and would love to know if I can assist you in any way? @kodyclemens

All 14 comments

I'd be happy to tackle this issue.

Hey, I'm a first time user of GitHub and would love to know if I can assist you in any way? @kodyclemens

@Esh08 Unfortunately I think this issue may have to wait as Codeclimate does not yet support the new gem, which is resulting in failing tests.

Thanks! That's too bad - maybe we can mark the PR with that and then merge it hopefully down the road once it is supported? Thank you for your help!!!

@kodyclemens @jywarren CodeClimate currently only supports rubocop ~> 0.52.0. We had this same issue with mapknitter at https://github.com/publiclab/mapknitter/pull/547

Is this needed now? This link says that codeclimate should support rubocop-performance:
https://github.com/codeclimate/codeclimate-rubocop/issues/166

Let me know and I'll create a pull request.

Hi there, I would like to take this issue (as a first-timers-only) :)

@Lisa-Caton go ahead its all yours

great - I'll get started asap! Thanks so much.

I think I am stuck. When I did the pr it looks like my branch isn't passing checks with my submission. https://github.com/publiclab/plots2/pull/6437 I've only added the 2 lines to the code. And when I ran rubocop --require rubocop-performance it ran without errors on my terminal. (92 files inspected, 126 offenses detected) Since I am able to run the working command locally, I'm not sure what to do next.

Hi @Lisa-Caton I will take a look

Thanks!!

Is this issue solved? Can we close this?

Let's close it! Looks OK!

Was this page helpful?
0 / 5 - 0 ratings