denny / ShinyCMS-ruby

ShinyCMS is an open-source CMS built in Ruby on Rails, with support for themes, plugins, and cloud hosting. (There is also a Perl version: www.github.com/denny/ShinyCMS)
https://shinycms.org
GNU General Public License v2.0
33 stars 11 forks source link

Fix rubocop-rspec warnings for RSpec/AnyInstance and RSpec/InstanceVariable #846

Open denny opened 3 years ago

denny commented 3 years ago

Currently there are two categories of warning from rubocop-rspec which have not been fixed:

denny commented 3 years ago

If you're interested in tackling these warnings, the relevant filenames are in the .rubocop_todo.yml file, and the links in the issue have more information about each type of warning and how to fix it.

If you are a less experienced developer who is looking at this issue and thinking you'd like to try to take it on but you're not entirely confident, please get in touch - I would be happy to help you get set up, or have a more detailed discussion about what needs doing, or even pair with you on the coding itself. 🙂

In my day job I'm a lead developer who often mentors less experienced developers, and I'd love to use some of that experience to help people take their first steps into contributing to open source projects.

haleydek commented 3 years ago

I'd be happy to tackle these rubocop-rspec warnings this week!

denny commented 3 years ago

I'd be happy to tackle these rubocop-rspec warnings this week!

That'd be great, thanks @haleydek! I particularly look forward to learning how I should have done the ones that use allow_any_instance_of 😃

denny commented 3 years ago

Some progress on this during the core plugin refactoring recently; it's now down to 195 warnings for RSpec/InstanceVariable (and still 24 for RSpec/AnyInstance).

denny commented 3 years ago

Ground my way through a few more of the instance variable warnings; down from 195 to 135 warnings now, and down from 10 files to 5.

If anybody else is interested in picking this task up , you can see the kind of changes that I've been making to get rid of this particular warning here: https://github.com/denny/ShinyCMS-ruby/pull/961

Still no idea how to tackle the AnyInstanceOf ones, mind you. 😝

denny commented 3 years ago

@haleydek, are you still around? Anything I can do to help you get started on the rest of these, if you're still interested? No problem if you're busy or whatever, of course, just thought I'd offer while the ones I just did are fresh in my mind 🙂