-
-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
Fix Rubocop trailing /
bug
#13212
Fix Rubocop trailing /
bug
#13212
Conversation
@danielbayley Can you provide a bit more context here? Thanks! |
ef8caaf
to
a333d1c
Compare
Sure. This particular Rubocop rule keeps throwing errors unrelated to the trailing |
Can you provide some example casks/PRs/homepages/strings? |
I think I can see what you're getting at but I don't understand the regex change given Surely the fix for interpolation error is to use the |
a333d1c
to
4a796ed
Compare
Yeah sorry, I misread the regex… That bit was actually unrelated.
Yes I thought that was the problem (it should be that anyway), but it’s still throwing |
So in a lot of (tap) casks, I have something like: repo = "github.com/user/repo"
url "https://#{repo}/releases/download/v#{version}/...zip"
# …
homepage "https://#{repo}#readme"
# … Use of `repo` elsewhere… |
Oh right I see the issue. That'll appear as an invalid URI with interpolated strings no matter what (despite it matching Does this work? domain = URI(url_node.str_content).host
return if domain.blank? |
Not quite, but domain = URI(url_node.str_content).host rescue nil
return if domain.blank? does… |
4a796ed
to
8b8f3f2
Compare
8b8f3f2
to
a9fed40
Compare
a9fed40
to
7d145f5
Compare
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.
LGTM if it works
Thanks again @danielbayley! |
brew style
with your changes locally?brew typecheck
with your changes locally?brew tests
with your changes locally?