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

Check commit rake task #7984

Merged
merged 2 commits into from May 21, 2020
Merged

Check commit rake task #7984

merged 2 commits into from May 21, 2020

Conversation

marcandre
Copy link
Contributor

I typically want to run rubocop and rspec on the last commit (or few last commits), so I thought maybe this rake task could be useful to others?

If not, I'll use it for myself and simply add something like tasks/local in .gitignore

@marcandre marcandre force-pushed the check_commit branch 2 times, most recently from 26833a1 to ba22329 Compare May 17, 2020 03:31
@bbatsov
Copy link
Collaborator

bbatsov commented May 17, 2020

It seems useful to me, but I less we document it somewhere in dev docs I doubt someone would ever find and use it. The dev docs are pretty light right now - just one page about writing new cops that leaves a lot to be desired (I noticed its poor state only today when I saw the docs weren't rebuilding after the extraction of rubocop-ast - the config needed to be updated).

@marcandre marcandre force-pushed the check_commit branch 2 times, most recently from 1e7baa0 to 30f1bc6 Compare May 20, 2020 23:41
@marcandre marcandre merged commit 8cee1c7 into rubocop:master May 21, 2020
@marcandre
Copy link
Contributor Author

Added a mention in the docs and in the ChangeLog

@marcandre marcandre deleted the check_commit branch May 21, 2020 00:24
@ansonhoyt
Copy link

This is a neat idea. Just trying out 0.84.0 and saw this in the changelog, but I don't have this task. Nothing from rake -T check_commit.

How should I call it?

@marcandre
Copy link
Contributor Author

marcandre commented May 21, 2020

I amended the Changelog to state that this is available only when developing from the main repo...

If you want to use something similar for your own projects, you can inspire yourself from this rake task, and you'll need to require 'rubocop/rake_task' too.

@ansonhoyt
Copy link

Ahh, that makes sense. Thanks for explaining!

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.

None yet

3 participants