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

Update robocop version to work with ruby 3.2 #2870

Merged
merged 2 commits into from
May 22, 2023

Conversation

GustavoCaso
Copy link
Member

@GustavoCaso GustavoCaso commented May 22, 2023

What does this PR do?

I Updated the rubocop version for the newer version of Ruby.

I primarily work on the latest version of ruby, and my IDE was complaining the rubocop version installed did not recognise ruby 3.2

I added a condition on our Gemfile to fix that.

Here is the rubocop file that specifies which ruby version is supported. The update I did was a bit on the conservative side. There is a newer version of Rubocop 1.51.0.

If we feel courageous, we can try the latest version 😄

Motivation

Additional Notes

How to test the change?

@GustavoCaso GustavoCaso requested a review from a team May 22, 2023 09:36
@GustavoCaso GustavoCaso force-pushed the update-rubocop-version-for-newest-ruby-versioon branch from ccd8d4a to 813a803 Compare May 22, 2023 09:41
@GustavoCaso GustavoCaso force-pushed the update-rubocop-version-for-newest-ruby-versioon branch from 813a803 to 6fc349a Compare May 22, 2023 10:03
Gemfile Outdated Show resolved Hide resolved
@@ -30,7 +30,7 @@
context "for fixture #{File.basename(filename)}" do
# Create a context for each example inside the JSON fixture file
JSON.parse(f.read).each_with_index do |(env, tags), i|
context "##{i}" do
context i.to_s do
Copy link
Member Author

Choose a reason for hiding this comment

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

Rubocop was complaining of RSpec/ContextMethod cop.

Since i doe snot represent a method name, I decided to drop the # sign

Copy link
Member

@ivoanjo ivoanjo left a comment

Choose a reason for hiding this comment

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

👍 LGTM

Gemfile Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented May 22, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.09%. Comparing base (b4a2eae) to head (8ed2408).
Report is 3446 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2870      +/-   ##
==========================================
- Coverage   98.09%   98.09%   -0.01%     
==========================================
  Files        1269     1269              
  Lines       69969    69969              
  Branches     3161     3161              
==========================================
- Hits        68638    68633       -5     
- Misses       1331     1336       +5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

…e ruby version. Only install rubocop if ruby version is 2.6.0 or higher
@GustavoCaso GustavoCaso merged commit 7479fc5 into master May 22, 2023
@GustavoCaso GustavoCaso deleted the update-rubocop-version-for-newest-ruby-versioon branch May 22, 2023 11:59
@github-actions github-actions bot added this to the 1.12.0 milestone May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants