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

Add new Rails/ActiveSupportOnLoad cop. #749

Merged
merged 1 commit into from
Sep 9, 2022

Conversation

bdewater
Copy link
Contributor

@bdewater bdewater commented Jul 22, 2022

See rubocop/rails-style-guide#323

This cop is extracted from Shopify's internal Rubocop repository. Many thanks to the original authors for their work.


Before submitting the PR make sure the following are checked:

  • The PR relates to only one subject with a clear title and description in grammatically correct, complete sentences.
  • Wrote good commit messages.
  • Commit message starts with [Fix #issue-number] (if the related issue exists).
  • Feature branch is up-to-date with master (if not - rebase it).
  • Squashed related commits together.
  • Added tests.
  • Ran bundle exec rake default. It executes all tests and runs RuboCop on its own code.
  • Added an entry (file) to the changelog folder named {change_type}_{change_description}.md if the new code introduces user-observable changes. See changelog entry format for details.
  • If this is a new cop, consider making a corresponding update to the Rails Style Guide.

@bdewater bdewater marked this pull request as ready for review September 5, 2022 22:29
@bdewater bdewater force-pushed the active-support-on-load branch 2 times, most recently from a4f4562 to 7f213f8 Compare September 6, 2022 15:15
@bdewater
Copy link
Contributor Author

bdewater commented Sep 6, 2022

Not sure what's going on with the test failures - they don't seem related to the changes and locally on the master branch seeing the same errors.

CHANGELOG.md Outdated Show resolved Hide resolved
config/default.yml Outdated Show resolved Hide resolved
@bdewater bdewater force-pushed the active-support-on-load branch 2 times, most recently from 513420d to d598a72 Compare September 7, 2022 15:11
@bdewater
Copy link
Contributor Author

bdewater commented Sep 7, 2022

Thank you for your suggestions @koic 🙇‍♂️ it led me to a Rails page that showed many more load hooks, I added these as well.

This cop is extracted from Shopify's internal Rubocop repository. Many thanks to the original authors for their work.

Co-authored-by: Julian Nadeau <[email protected]>
Co-authored-by: Rafael Mendonça França <[email protected]>
Co-authored-by: Francois Chagnon <[email protected]>
Co-authored-by: Jean Boussier <[email protected]>
@koic koic merged commit 91cd6bb into rubocop:master Sep 9, 2022
@koic
Copy link
Member

koic commented Sep 9, 2022

@bdewater Thanks!

@bdewater bdewater deleted the active-support-on-load branch September 9, 2022 14:44
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