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

Run RuboCop over its self for the default rake task #571

Merged
merged 2 commits into from
Oct 16, 2013

Conversation

nevir
Copy link
Contributor

@nevir nevir commented Oct 16, 2013

I think this'll help a lot for contributors (the current breakage on master, and I ran into it on my other pull requests too) - force us to check style by default :)

@@ -23,7 +23,15 @@ task :coverage do
Rake::Task['spec'].execute
end

task default: :spec
desc 'Run RuboCop over its self'
task :inception do
Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oh, perfect! I'll switch it over to that

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Or, maybe not.

It adds a fair bit of load time to the rake file (quarter of a second on my MBP). How perf-sensitive should I be here, @bbatsov? (Though, I suppose the better approach is to optimize the load time of rubocop/rake_task in general, if it's a concern)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually, just committed best of both worlds

bbatsov added a commit that referenced this pull request Oct 16, 2013
Run RuboCop over its self for the default rake task
@bbatsov bbatsov merged commit fb01a66 into rubocop:master Oct 16, 2013
@bbatsov
Copy link
Collaborator

bbatsov commented Oct 16, 2013

@nevir Nice solution!

@@ -23,7 +24,10 @@ task :coverage do
Rake::Task['spec'].execute
end

task default: :spec
desc 'Run RuboCop over its self'
Copy link
Collaborator

Choose a reason for hiding this comment

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

"its self"? Not "itself"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Doh!

@nevir nevir deleted the always-check-style branch October 16, 2013 20:32
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.

4 participants