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

allow custom cmd option for rubocop #48

Merged
merged 2 commits into from
Aug 27, 2021
Merged

Conversation

desheikh
Copy link
Contributor

Add a custom command option for when you want to use bundled or bin stubbed version of rubocop.

@coveralls
Copy link

coveralls commented Dec 28, 2020

Pull Request Test Coverage Report for Build 447927375

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 330803147: 0.0%
Covered Lines: 135
Relevant Lines: 135

💛 - Coveralls

@desheikh
Copy link
Contributor Author

desheikh commented Feb 3, 2021

@bbatsov would you be able to review this?

@desheikh
Copy link
Contributor Author

Gentle bump. @koic perhaps if you are able?

@freesteph
Copy link

Also registering interest for this simple but essential feature.

@databyte
Copy link

Yes, works great with spring to generate a binstub for rubocop so you can start executing it even faster.

@databyte
Copy link

databyte commented Aug 26, 2021

I'd also like to just execute rubocop within guard for modified files only. Example cmd:

guard :rubocop, cmd: "git ls-files -m | xargs ls -1 2>/dev/null | grep '\.rb$' | xargs bin/rubocop" do
  watch(%r{.+\.rb$})
  watch(%r{(?:.+/)?\.rubocop(?:_todo)?\.yml$}) { |m| File.dirname(m[0]) }
end

Copy link
Member

@koic koic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. However I don't have release authority of this gem.
@yujinakayama @bbatsov Can you review and release this one?

@bbatsov
Copy link
Contributor

bbatsov commented Aug 26, 2021

Ops, seems I had unwatched this repo by accident and didn't see the previous messages. Sorry about that!

This change looks good indeed, but should also be mentioned in the changelog and the README (otherwise it's unlikely that someone will find it).

@desheikh
Copy link
Contributor Author

Ops, seems I had unwatched this repo by accident and didn't see the previous messages. Sorry about that!

This change looks good indeed, but should also be mentioned in the changelog and the README (otherwise it's unlikely that someone will find it).

Thanks Team! I've updated the README.

@bbatsov
Copy link
Contributor

bbatsov commented Aug 26, 2021

Hmm, something's wrong with the CI build.

@databyte
Copy link

@bbatsov bbatsov merged commit 0fdb556 into rubocop:master Aug 27, 2021
@bbatsov
Copy link
Contributor

bbatsov commented Aug 27, 2021

Okay, I'll merge this and I'll cut a new release after we update the CI for Ruby 3.

@koic
Copy link
Member

koic commented Aug 27, 2021

Or I can update the CI over this weekend and cut a new release. (coverall's issue may be commented out as a workaround)

koic added a commit to koic/guard-rubocop that referenced this pull request Aug 28, 2021
This PR is a workaround for rubocop#48 (comment).
@koic koic mentioned this pull request Aug 28, 2021
koic added a commit to koic/guard-rubocop that referenced this pull request Aug 28, 2021
This PR is a workaround for rubocop#48 (comment).
@koic
Copy link
Member

koic commented Aug 28, 2021

I've released v1.5.0. Thank you!
https://github.com/rubocop/guard-rubocop/releases/tag/v1.5.0

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.

6 participants