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
Add Style/OpenStructUse Cop #10217
Add Style/OpenStructUse Cop #10217
Conversation
Tests are failing because RuboCop uses |
Can you add a test that no offense is registered for |
Thanks for all the thorough feedback @dvandersluis ; before I get into cleaning up the commit history, would you mind having a final pass over the changes? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mttkay this is looking great! I added one last comment but this is basically good to go once squashed. Thanks for your work! ❤️
89c4c29
to
95ee32e
Compare
This flags any use of the OpenStruct type, whose use is now officially discouraged.
c2acaa7
to
67610a8
Compare
Thanks for all the help @dvandersluis -- I believe this is ready for a final review. I added a changelog entry and squashed commits. I noticed that the spellcheck jobs require additional approval?
|
Thank you again for your work on this! It's looking ready to go for me now.
Github actions runs have to be approved for first time contributors, it's running now. |
Follow up #10217. This commit removes useless `require 'ostruct'`.
This flags any use of the OpenStruct type, whose use is now officially discouraged.
Originally written as part of https://gitlab.com/gitlab-org/gitlab-styles/-/merge_requests/92.
This PR addresses existing
OpenStruct
offenses in RuboCop itself as well.Fixes #10206
Before submitting the PR make sure the following are checked:
[Fix #issue-number]
(if the related issue exists).master
(if not - rebase it).bundle exec rake default
. It executes all tests and runs RuboCop on its own code.{change_type}_{change_description}.md
if the new code introduces user-observable changes. See changelog entry format for details.