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

[Testing] rubocop default cops TODOs #2

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

dazza-codes
Copy link

@dazza-codes dazza-codes commented Nov 28, 2016

Looking at default rubocop TODOs. Started with a blank slate, i.e.

rm .rubocop*
rubocop --auto-gen-config  # creates todo file
echo "inherit_from: .rubocop_todo.yml" > .rubocop.yml
rubocop # should be no problems

Then review each of the TODO items, first focusing on the ones with large offense counts. Move the config from .rubocop_todo.yml into the .rubocop.yml and read the configuration options for that cop at http://rubocop.readthedocs.io/en/latest/cops/ and then set it to something that might work. Then run rubocop again to see what that complains about. Try to get a very small set of complaints, if any. Then use rubocop --auto-correct to tidy things up. Then commit the change and move onto the next cop. Once all the main cops are configured in this way, you have a .rubocop.yml file that represents how you want rubocop to respect your code. It might get tweaked, depending on how restrictive or lenient you want rubocop to be.

For reference or comparison, consider the Thoughtbot ruby style:
https://github.com/thoughtbot/guides/tree/master/style/ruby

@coveralls
Copy link

Coverage Status

Coverage remained the same at 95.706% when pulling af15fe2 on dpn-admin:rubocop-default-todos into a1bf1e4 on mlibrary:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage remained the same at 95.706% when pulling af15fe2 on dpn-admin:rubocop-default-todos into a1bf1e4 on mlibrary:master.

@coveralls
Copy link

coveralls commented Nov 28, 2016

Coverage Status

Coverage remained the same at 95.706% when pulling 88fe747 on dpn-admin:rubocop-default-todos into a1bf1e4 on mlibrary:master.

@dazza-codes dazza-codes force-pushed the rubocop-default-todos branch from 73fe742 to a1260b5 Compare November 28, 2016 23:20
@coveralls
Copy link

coveralls commented Nov 28, 2016

Coverage Status

Coverage remained the same at 95.706% when pulling a1260b5 on dpn-admin:rubocop-default-todos into a1bf1e4 on mlibrary:master.

@coveralls
Copy link

coveralls commented Nov 28, 2016

Coverage Status

Coverage remained the same at 95.706% when pulling a1260b5 on dpn-admin:rubocop-default-todos into a1bf1e4 on mlibrary:master.

@coveralls
Copy link

coveralls commented Nov 28, 2016

Coverage Status

Coverage remained the same at 95.706% when pulling 991ecfe on dpn-admin:rubocop-default-todos into a1bf1e4 on mlibrary:master.

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.

2 participants