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

Setup rubocop. #770

Merged
merged 1 commit into from
Aug 29, 2014
Merged

Setup rubocop. #770

merged 1 commit into from
Aug 29, 2014

Conversation

myronmarston
Copy link
Member

Closes #702.

@myronmarston myronmarston mentioned this pull request Aug 28, 2014
@myronmarston
Copy link
Member Author

This is green and I'd like to include this in 3.1...otherwise we're liable to have merge conflicts when backporting bug fixes from master to 3-1-maintenance.

Anyone want to review this?

/cc @JonRowe @samphippen @soulcutter @cupakromer @xaviershay @yujinakayama

desc 'Run RuboCop on the lib directory'
RuboCop::RakeTask.new(:rubocop) do |task|
task.patterns = ['lib/**/*.rb']
end
Copy link
Member

Choose a reason for hiding this comment

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

This probably needs to be scoped to if rubocop is available. Otherwise, on other ruby versions it will cause any rake command to fail.

Copy link
Member Author

Choose a reason for hiding this comment

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

That's probably a good idea, but it hasn't been a problem in the other repos:

...and it hasn't been a problem yet. Still, it's a good idea.

Copy link
Member Author

Choose a reason for hiding this comment

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

Actually, I'm going to nuke the task entirely; the rubocop command is more flexible and we don't need this for our build.

@cupakromer
Copy link
Member

In general LGTM. Left a few comments / questions. None are merge blockers.

@cupakromer
Copy link
Member

👍 merge when green

@@ -250,15 +253,14 @@ def allow_no_prepended_module_definition_of(method_name)
return unless problem_mod

raise RSpec::Mocks::MockExpectationError,
"Using `any_instance` to stub a method (#{method_name}) that has been " +
"Using `any_instance` to stub a method (#{method_name}) that has been " \
"defined on a prepended module (#{problem_mod}) is not supported."
Copy link
Member

Choose a reason for hiding this comment

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

I think this line should be aligned with the previous line (and maybe RuboCop should be improved to detect this).

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah woops, that's weird. I'll fix that.

myronmarston added a commit that referenced this pull request Aug 29, 2014
@myronmarston myronmarston merged commit a32ecea into master Aug 29, 2014
@myronmarston myronmarston deleted the setup-rubocop branch August 29, 2014 05:05
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.

Setup rubocop
3 participants