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

Adding rubocop-rspec #52

Draft
wants to merge 19 commits into
base: main
Choose a base branch
from
Draft

Adding rubocop-rspec #52

wants to merge 19 commits into from

Conversation

schmidt
Copy link

@schmidt schmidt commented Oct 9, 2022

Description

Following the suggestion in #46, this PR adds rubocop-rspec and attempts to fix any offenses.

Type of branch

Feature #46

Type of change

Please delete options that are not relevant.

  • Only changes to the test suite
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • running bundle exec rspec
  • running bundle exec rubocop

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@schmidt
Copy link
Author

schmidt commented Oct 9, 2022

I've started with the low-hanging fruits and this PR already includes a huge number of changes. But I'm willing to continue if you think this is valuable.

There are still some items left though (output of rubocop -fo).

86   RSpec/NamedSubject
21   RSpec/MessageSpies
12   RSpec/MultipleExpectations
10   RSpec/ExampleLength
8    RSpec/NestedGroups
7    RSpec/StubbedMock
6    RSpec/MultipleMemoizedHelpers
4    RSpec/SubjectStub
3    RSpec/ExpectInHook

And those will require more involved changes in regards to code organization or naming. So let me know what you think. I'm also happy to do this in multiple PRs (with .rubocop-todo.yml) to avoid giant PRs.

Copy link

@gleopoldo gleopoldo left a comment

Choose a reason for hiding this comment

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

Nice job @schmidt !

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.

2 participants