-
Notifications
You must be signed in to change notification settings - Fork 10
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
Packaging/RequireHardcodingLib: Warning when absolute path was used #35
Comments
Hi @olleolleolle 👋🏻 So the issue is using such calls from the Does this make sense? Should I/we elaborate more? Or should we improve the documentation and make it more verbose? |
Hi! What I'm noticing is that this "cop" is not really about |
I am not sure what that means? rubocop-packaging/lib/rubocop/cop/packaging/require_hardcoding_lib.rb Lines 46 to 52 in 9eeb5a8
|
Yeah, I know! I'm just saying that it doesn't need to be! If I have this code in my foo = File.expand_path("../../../lib/generators/paper_trail/install/install_generator", __dir__) Then it'd be useful for you debian packagers that a cop alerts me that this is not friendly for you. Right? |
I want to take a moment to thank you both, @deivid-rodriguez and @utkarsh2102 for taking my short description describing it so well. |
Oooh, that's a great suggestion, indeed!
AFAIR, this is what happened recently, no? The issues I reported with rubygems and it boiled down to such lines of code? Or was it something different?
Indeed, I think this is a great idea! We need to:
|
Hey, @samyak-jn, do you want to give this a shot? |
Hey @utkarsh2102, |
Correct, that's exactly how rubygems tests broke in debian last time 👍. |
This warning happened.
But,
File.expand_path
was used, so it is an absolute path.Perhaps the check can include knowing what
File.expand_path
does to a path?The text was updated successfully, but these errors were encountered: