sup
sup copied to clipboard
Follow GH Ruby styleguide
When reading through the source you'll notice alot of different style used. Im under the impression that nobody reads HACKING and therefor propose to switch to the Github Ruby Styleguide for all future commit as it seems more 'standard' than HACKING.
Why not introducing https://github.com/bbatsov/rubocop to the project? You can add this to the rake task running the test suite. This will check/ensure the Community Ruby Styleguide https://github.com/bbatsov/ruby-style-guide.
Could rubocops output automatically be posted on PR's as Travis now does?
There's no need for that from my point of view. You could use their rake-task and make your test-task to depend on that:
task test: %w(test:rubocop test:minitest)
Then add something like this to .travis.yml
:
[...]
script: rake test
[...]
On every push to github rake test
is run. And because it depends on rake test:rubocop
, rubocop runs before the minitest-testsuite is run. And it fails with an understandable error message which exactly tell what you need to fix.
BTW You want something like this in your .rubocop.yml
.
AllCops:
Exclude:
- 'tmp/**/*'
DisplayCopNames: true
Thanks. Im interested in what @gauteh thinks about this?
That would probably be good, but it also requires us to go through the old source and fix it.
Ill have time on my hands in the near future. I can pick this up, though I would like some help if possible.
Could rubocops output automatically be posted on PR's as Travis now does?
Hound does: https://houndci.com/