Skip to content

Add latest rubocop and use Ruby 2.6+#1311

Merged
olleolleolle merged 20 commits intomainfrom
add-latest-rubocop-and-use-26
Aug 17, 2021
Merged

Add latest rubocop and use Ruby 2.6+#1311
olleolleolle merged 20 commits intomainfrom
add-latest-rubocop-and-use-26

Conversation

@olleolleolle
Copy link
Copy Markdown
Member

@olleolleolle olleolleolle commented Aug 16, 2021

Description

This introduces the latest RuboCop version, and sets lower bound of Ruby support to 2.6.

This does the absolute minimum, to get it configured.

  • We landed some new rules, perhaps we'll go with "all new rules", soon, I don't know.
  • The TODO file grew a small amount.

See #1309

Todos

  • Add the new set of defaults
  • Re-run the auto-generated todo file

Additional Notes

We will see if there are many separate steps to take, if we need a big checklist & issues etc.

@olleolleolle olleolleolle changed the title Add latest rubocop and use 26 Add latest rubocop and use Ruby 2.6+ Aug 16, 2021
@olleolleolle olleolleolle requested a review from iMacTia August 16, 2021 12:39
@olleolleolle olleolleolle force-pushed the add-latest-rubocop-and-use-26 branch from c1a52b3 to 1fcfef4 Compare August 16, 2021 13:52
Copy link
Copy Markdown
Member

@iMacTia iMacTia left a comment

Choose a reason for hiding this comment

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

Fantastic work @olleolleolle and well done keeping the todo file under control 👏
I just have a question about auto-correctable cops

Comment thread .rubocop_todo.yml Outdated
We are after the side-effect of setting something in the last match,
from this "useless" RegExp.
also Performance/RedundantSplitRegexpArgument.
Comment thread .rubocop_todo.yml
Max: 14

# Offense count: 3
Style/DocumentDynamicEvalDefinition:
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I want to talk a bit about this rule, since the fix will have visual impact, and we'd like to pick the nicest alternative.

Copy link
Copy Markdown
Member

@iMacTia iMacTia left a comment

Choose a reason for hiding this comment

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

This is good as is IMO, we can discuss the pending points offline and address in a follow-up

@olleolleolle olleolleolle merged commit abe78b5 into main Aug 17, 2021
@olleolleolle olleolleolle deleted the add-latest-rubocop-and-use-26 branch August 17, 2021 06:44
@olleolleolle olleolleolle linked an issue Aug 17, 2021 that may be closed by this pull request
@olleolleolle olleolleolle mentioned this pull request Aug 17, 2021
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.

Update Rubocop

2 participants