-
-
Notifications
You must be signed in to change notification settings - Fork 78
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
Prefer require_relative
for internal requires
#622
Prefer require_relative
for internal requires
#622
Conversation
`require_relative` is preferred over `require` for files within the same project because it uses paths relative to the current file, making code more portable and less dependent on the load path. This change updates internal requires to use `require_relative` for consistency, performance, and improved portability. Ref: - ruby/psych#522 - ruby/logger#20 - ruby/rdoc#658 - panorama-ed/memo_wise#349 - rubocop/rubocop#8748
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #622 +/- ##
=======================================
Coverage 94.31% 94.31%
=======================================
Files 17 17
Lines 457 457
=======================================
Hits 431 431
Misses 26 26 ☔ View full report in Codecov by Sentry. |
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.
Yes, this is awesome and a nice practice ❤️. Thank you!
`require_relative` is preferred over `require` for files within the same project because it uses paths relative to the current file, making code more portable and less dependent on the load path. This change updates internal requires to use `require_relative` for consistency, performance, and improved portability. Ref: - activeadmin/arbre#622
`require_relative` is preferred over `require` for files within the same project because it uses paths relative to the current file, making code more portable and less dependent on the load path. This change updates internal requires to use `require_relative` for consistency, performance, and improved portability. Ref: - activeadmin/arbre#622
`require_relative` is preferred over `require` for files within the same project because it uses paths relative to the current file, making code more portable and less dependent on the load path. This change updates internal requires to use `require_relative` for consistency, performance, and improved portability. Ref: - activeadmin/arbre#622 - activeadmin/inherited_resources#939
`require_relative` is preferred over `require` for files within the same project because it uses paths relative to the current file, making code more portable and less dependent on the load path. This change updates internal requires to use `require_relative` for consistency, performance, and improved portability. Ref: - activeadmin/arbre#622 - activeadmin/inherited_resources#939
`require_relative` is preferred over `require` for files within the same project because it uses paths relative to the current file, making code more portable and less dependent on the load path. This change updates internal requires to use `require_relative` for consistency, performance, and improved portability. Ref: - activeadmin/arbre#622 - activeadmin/inherited_resources#939
`require_relative` is preferred over `require` for files within the same project because it uses paths relative to the current file, making code more portable and less dependent on the load path. This change updates internal requires to use `require_relative` for consistency, performance, and improved portability. Ref: - activeadmin/arbre#622 - activeadmin/inherited_resources#939
`require_relative` is preferred over `require` for files within the same project because it uses paths relative to the current file, making code more portable and less dependent on the load path. This change updates internal requires to use `require_relative` for consistency, performance, and improved portability. Ref: - activeadmin/arbre#622 - activeadmin/inherited_resources#939
Hi @deivid-rodriguez, I ran into an issue that you are probably familiar with while experimenting with GemBench
If you think this is a good change, I'll do the same for inherited_resources
require_relative
is preferred overrequire
for files within the same project because it uses paths relative to the current file, making code more portable and less dependent on the load path.This change updates internal requires to use
require_relative
for consistency, performance, and improved portability.Ref:
require_relative
for internal requires ruby/psych#522require_relative
rubocop/rubocop#8748