-
Notifications
You must be signed in to change notification settings - Fork 253
Add rubocop to project, delivers #179 #181
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
Conversation
@@ -10,4 +13,4 @@ Rake::TestTask.new do |t| | |||
t.verbose = true | |||
end | |||
|
|||
task :default => :test | |||
task default: [:rubocop, :test] |
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.
Could you change travis.yml to run these two tasks separately? I'd prefer the default rake task be just tests.
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.
👍 agreed.
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.
IMHO having it not enforced, you can just do a gem install rubocop
and run rubocop
, no need for this PR. See a grape build for example: https://travis-ci.org/intridea/grape/jobs/44609939
@mynameisrufus was hoping to see a demo of RuboCop catching/enforcing a style guide rule here since I'm not familiar with its output. I can check it out and run it locally, but will delay me getting back to this. |
👍 for the output. @mynameisrufus once you tweak it so this only runs in Travis, I'll be happy to merge. |
Oh sorry I misunderstood, I thought you did not want it to run in travis, coming right up. |
Ready for merge |
@mynameisrufus looks like Rubinius is failing here: https://travis-ci.org/ruby-ldap/ruby-net-ldap/jobs/44879650 This might need to be only enabled for MRI Rubies? |
Should running |
I don't know how you are getting that to happen. Can you give me more details? Here is what I get running
I'm not sure what is happening on Travis, I ran the same locally no problem:
Rubocop is built against Do we not run rubocop on rbx or just leave it broken for now? It's broken sans rubocop anyway. |
@mynameisrufus I ran
It's broken for JRuby but not RBX (a known error): https://travis-ci.org/ruby-ldap/ruby-net-ldap/builds/44998776 I say we just run Rubocop for MRI. I'd have to check the Travis docs to figure out how to detect and run it only for that env. |
This adds https://github.com/bbatsov/rubocop to the project with an auto generated `.rubocop_todo.yml`. The violations can be addressed over time without breaking the build. Also added is the `rake ci` task that runs `test` and `rubocop` only on mri. The `rubotest` task is the same is `rake ci` but will run on all rubies, the default rake task just runs test as per usual. Conflicts: net-ldap.gemspec
@mtodd I have added |
Add rubocop to project, delivers #179
🍻 |
Add rubocop to project, delivers ruby-ldap#179
This adds https://github.com/bbatsov/rubocop to the project with an auto
generated
.rubocop_todo.yml
. The violations can be addressed over time withoutbreaking the build.