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

Added Rubocop #55

Merged
merged 3 commits into from Jun 20, 2017

Conversation

Projects
None yet
3 participants
@nikhilgupta1211
Contributor

nikhilgupta1211 commented Jun 18, 2017

No description provided.

@openSUSE openSUSE deleted a comment from coveralls Jun 19, 2017

@coveralls

This comment has been minimized.

coveralls commented Jun 19, 2017

Coverage Status

Coverage decreased (-0.3%) to 92.239% when pulling c471d24 on nikhilgupta1211:rubocop into 3333581 on openSUSE:master.

@openSUSE openSUSE deleted a comment from coveralls Jun 19, 2017

@bgeuken

This comment has been minimized.

Member

bgeuken commented Jun 19, 2017

@nikhilgupta1211 JFYI, I just merged #54. You'll need to rebase your branch.

Added Rubocop
Added rubocop to the gem file and generated the .rubocop_todo.yml and created .rubocop.yml
@coveralls

This comment has been minimized.

coveralls commented Jun 19, 2017

Coverage Status

Coverage decreased (-0.2%) to 92.362% when pulling 48e3e5b on nikhilgupta1211:rubocop into 0e14e82 on openSUSE:master.

gem 'state_machines-yard'
gem 'yard-activerecord'
# for static code analisys
gem 'rubocop', '~> 0.49.1', require: false

This comment has been minimized.

@bgeuken

bgeuken Jun 19, 2017

Member

Why did you add the 'require: false' here?

This comment has been minimized.

@bgeuken

bgeuken Jun 19, 2017

Member

Ah, nevermind

This comment has been minimized.

@nikhilgupta1211

nikhilgupta1211 Jun 19, 2017

Contributor

Because we don't need it to be required in the code but to only run it from command line

gem 'clockwork'
gem 'ransack'
gem 'show_for'
gem 'simple_form'

This comment has been minimized.

@bgeuken

bgeuken Jun 19, 2017

Member

Did you reorder the gems or was that rubocop? And why did you change the order, if you did?

This comment has been minimized.

@nikhilgupta1211

nikhilgupta1211 Jun 19, 2017

Contributor

rubocop autocorrect reordered the gems

@bgeuken

This comment has been minimized.

Member

bgeuken commented Jun 19, 2017

@nikhilgupta1211 The tsp page states that we support Ruby >= 1.9. I am currently try to find out if this is still up to date. But I assume that we have to support at least v2.0 or v2.1. So we can not use features like &..

On my development machine I am using ruby 2.2.6 and currently I get 19 test failures with this branch.

@nikhilgupta1211

This comment has been minimized.

Contributor

nikhilgupta1211 commented Jun 19, 2017

Actually rubocop need ruby version >= 2.0.0, so which version should we use ?

@bgeuken

This comment has been minimized.

Member

bgeuken commented Jun 19, 2017

nikhilgupta1211 commented an hour ago

Actually rubocop need ruby version >= 2.0.0, so which version should we use ?

I any case something below 2.3. There might be a way to configure this in rubocop... at least for the autogenerated code. I would check that first.

@@ -12,3 +12,207 @@ AllCops:
- 'bundle/**/*'
- 'config/**/*'
- 'bin/*'

This comment has been minimized.

@bgeuken

bgeuken Jun 19, 2017

Member

Nice that you split the auto-correct changes in a separate commit 👍

@nikhilgupta1211

This comment has been minimized.

Contributor

nikhilgupta1211 commented Jun 19, 2017

we can set the ruby version like this

AllCops:
  TargetRubyVersion: 2.0
@bgeuken

This comment has been minimized.

Member

bgeuken commented Jun 19, 2017

Yep. Please do that. After that you might have to run the auto-correct again.

@nikhilgupta1211

This comment has been minimized.

Contributor

nikhilgupta1211 commented Jun 19, 2017

set the version to 2.0 ?

@nikhilgupta1211

This comment has been minimized.

Contributor

nikhilgupta1211 commented Jun 19, 2017

I have set the ruby version to 2.1.0

@coveralls

This comment has been minimized.

coveralls commented Jun 19, 2017

Coverage Status

Coverage decreased (-0.2%) to 92.366% when pulling 7426cf2 on nikhilgupta1211:rubocop into 0e14e82 on openSUSE:master.

@bgeuken

This comment has been minimized.

Member

bgeuken commented Jun 20, 2017

@nikhilgupta1211 Just spoke with Ancor. For now we have to stick with ruby 1.9 syntax. I would advise to start this from scratch, remove the auto corrects, add target version to 1.9 and then redo what you did before.

@coveralls

This comment has been minimized.

coveralls commented Jun 20, 2017

Coverage Status

Coverage decreased (-0.2%) to 92.366% when pulling aa44520 on nikhilgupta1211:rubocop into 0e14e82 on openSUSE:master.

@coveralls

This comment has been minimized.

coveralls commented Jun 20, 2017

Coverage Status

Coverage decreased (-0.2%) to 92.366% when pulling e5340ac on nikhilgupta1211:rubocop into 0e14e82 on openSUSE:master.

@coveralls

This comment has been minimized.

coveralls commented Jun 20, 2017

Coverage Status

Coverage decreased (-0.2%) to 92.366% when pulling a0ed4ac on nikhilgupta1211:rubocop into 0e14e82 on openSUSE:master.

nikhilgupta1211 added some commits Jun 18, 2017

Updated travis.yml
Updated the ruby version from 1.9.3 to 2.0, added gem update --system and a check for rubocop
Cleared rubocop offenses
Cleared the offenses for cops which support --auto-correct
@coveralls

This comment has been minimized.

coveralls commented Jun 20, 2017

Coverage Status

Coverage decreased (-0.2%) to 92.366% when pulling 9f264bd on nikhilgupta1211:rubocop into 0e14e82 on openSUSE:master.

@bgeuken

This comment has been minimized.

Member

bgeuken commented Jun 20, 2017

Nice work 👍

@bgeuken bgeuken merged commit dde4cca into openSUSE:master Jun 20, 2017

1 of 2 checks passed

coverage/coveralls Coverage decreased (-0.2%) to 92.366%
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment