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

Update rubocop #514

Merged
merged 12 commits into from
Dec 17, 2017
Merged

Update rubocop #514

merged 12 commits into from
Dec 17, 2017

Conversation

mvz
Copy link
Contributor

@mvz mvz commented Nov 12, 2017

Summary

Update RuboCop to 0.50.0

Details

  • Update RuboCop
  • Move TODO items to .rubocop_todo.yml to allow auto-generation.
  • Run RuboCop in a separate Travis stage.

Motivation and Context

Follow-up of #511.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

@olleolleolle
Copy link
Contributor

I wonder, did you ever see mry, the tool to rename .rubocop.yml rules as they move on? It's pretty rad.

Copy link
Contributor

@olleolleolle olleolleolle left a comment

Choose a reason for hiding this comment

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

A radical step, but I think it forms a distinct way forward.

@mvz
Copy link
Contributor Author

mvz commented Nov 12, 2017

did you ever see mry

No, but it looks really useful.

@mvz
Copy link
Contributor Author

mvz commented Nov 12, 2017

Unfortunately, RuboCop 0.51 requires Ruby >= 2.1, so we can either:

  • Keep using the old version, or
  • Not run RuboCop on older platforms.

@olleolleolle
Copy link
Contributor

Can you use TargetRubyVersion: 1.9 in the .rubocop.yml and then evict the running of RuboCop to a single 2.4.1 "Travis Build Stage", to be run before the tests (their own Test stage).

(Does 0.51.0 even support TargetRubyVersion: 1.9 any longer?)

@mvz
Copy link
Contributor Author

mvz commented Nov 12, 2017

It turns out 0.50.0 supports that target version, so let's see how things go with that version.

@olleolleolle
Copy link
Contributor

@mvz Thank you for going the distance with this issue.

@olleolleolle
Copy link
Contributor

@mvz To back up my "why don't you just" about RuboCop:

Here's a Travis configuration, which uses the built-in, implicit 'test' Stage, and adds a 'codestyle' stage.

https://github.com/egonSchiele/contracts.ruby/blob/master/.travis.yml

@mvz
Copy link
Contributor Author

mvz commented Nov 12, 2017

Right, so rubocop 0.50 also doesn't install on 1.9.3. @olleolleolle I'll go with your suggestion.

@olleolleolle
Copy link
Contributor

@mvz I might be that you must decide on script yourself, somehow.

@mvz
Copy link
Contributor Author

mvz commented Nov 14, 2017

I'll actually read the docs, now ;-)

@maxmeyer
Copy link
Member

@mvz Is this still work in progress?

@mvz
Copy link
Contributor Author

mvz commented Nov 18, 2017

@maxmeyer yes, I need to get the separate Travis build for RuboCop working.

@@ -6,10 +6,13 @@ require 'aruba/platform'
require 'bundler'
Bundler.setup

task :default => :test
task default: [:lint, :test]
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need both here?

Rakefile Outdated
desc 'Run the whole test suite. Any failure will stop rake going on'
task :test => %w(lint:travis lint:coding_guidelines lint:licenses test:rspec test:cucumber test:cucumber_wip)
desc 'Run all linters.'
task test: %w(lint:travis lint:coding_guidelines lint:licenses)
Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, sorry: this is labeled wrong: task lint: ... it should be!

@olleolleolle
Copy link
Contributor

@mvz I followed some error messages, and found a typo.

@mvz
Copy link
Contributor Author

mvz commented Dec 17, 2017

The Travis build was fixed.

Copy link
Contributor

@olleolleolle olleolleolle left a comment

Choose a reason for hiding this comment

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

Glad this worked out!

@mvz mvz merged commit 6b5e754 into master Dec 17, 2017
@mvz mvz deleted the update-rubocop branch December 17, 2017 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants