-
-
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
rubocops (cask/url): add rubocop to use csv instead of before|after_comma #12648
rubocops (cask/url): add rubocop to use csv instead of before|after_comma #12648
Conversation
…nd after_comma in cask
Review period will end on 2022-01-03 at 00:09:08 UTC. |
I'm not sure how to get the check to skip when a |
Please also add some new tests for this, thanks! |
Review period ended. |
@MikeMcQuaid I'm struggling to come up with tests that work for this. I am assuming I need to import the |
@bevanjkay Try to copy/paste existing RuboCop cask tests? @reitermarkus may be able to help more. |
@MikeMcQuaid I did do that. But I need to be able to mimic the interpolation in the strings. That's the part that I'm getting stuck at. I can push up as far as I got to tomorrow. |
Co-authored-by: Carlo Cabrera <[email protected]>
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.
Following up from on Slack, I thought I'd be nice and suggest the interpolation escaping changes here.
Library/Homebrew/test/rubocops/cask/url_legacy_comma_separators_spec.rb
Outdated
Show resolved
Hide resolved
Library/Homebrew/test/rubocops/cask/url_legacy_comma_separators_spec.rb
Outdated
Show resolved
Hide resolved
Library/Homebrew/test/rubocops/cask/url_legacy_comma_separators_spec.rb
Outdated
Show resolved
Hide resolved
Library/Homebrew/test/rubocops/cask/url_legacy_comma_separators_spec.rb
Outdated
Show resolved
Hide resolved
Library/Homebrew/test/rubocops/cask/url_legacy_comma_separators_spec.rb
Outdated
Show resolved
Hide resolved
Library/Homebrew/test/rubocops/cask/url_legacy_comma_separators_spec.rb
Outdated
Show resolved
Hide resolved
Library/Homebrew/test/rubocops/cask/url_legacy_comma_separators_spec.rb
Outdated
Show resolved
Hide resolved
Library/Homebrew/test/rubocops/cask/url_legacy_comma_separators_spec.rb
Outdated
Show resolved
Hide resolved
Library/Homebrew/test/rubocops/cask/url_legacy_comma_separators_spec.rb
Outdated
Show resolved
Hide resolved
Co-authored-by: Issy Long <[email protected]>
@MikeMcQuaid Should the style syntax fixes be merged (in the cask repos) before this PR is merged? |
@bevanjkay Yes, they should. Merging those is a prerequisite for the tap-syntax CI check on this PR to go green. |
Thanks @issyl0 the PRs have been merged. Are you able to restart the CI run now? |
Restarted. |
Thanks again @bevanjkay, great work, thanks for sticking with it 💪🏻 |
👏 |
brew style
with your changes locally?brew typecheck
with your changes locally?brew tests
with your changes locally?This adds a rubocop to check cask URLs for
version.before_comma
andversion.after_comma
and replace them withcsv.first
andcsv.second
respectively.We should discuss whether to start this as an
offence
or awarning
,bump-cask-pr
will automatically update any offending casks.