Closed querenker closed 6 years ago
There's also rubocop which is nice for code analyzation and also based on the ruby style guidelines. It is for example used by the openHPI project and is quite nice to use
@annkatrinkuessner Thanks for the fast reply. I think Hound actually uses RuboCop (https://houndci.com/configuration#ruby).
btw: rubocop is already included in the gemfile. only a .rubocop.yml is missing to set houndci and/or rubocop up :)
There is even a codeclimate config which uses rubocop. After adding this repo to codeclimate it should be possible to integrate this analysis into the PR workflow (@bjrne you should have received a request for approval by email). Running rubocop locally should already work but there are a lot of offenses....
222 files inspected, 4865 offenses detected
Actually I didn't @querenker, but that may have to do with m email settings. Sadly I didn't get any notification either. I tried my best on codeclimate, it should work now, but I'm not sure. It's also not so easy to filter on rubocop messages, we might want to change our config for this purpose.
@bjrne It seems to work 👍 At least PR #640 has a codeclimate check. What's the purpose for filtering on rubocop messages? Currently there is additional a check for duplicates and a Rails security scanner. For developers it shouldn't be important which specific engine complains, because every problem should be fixed ;) If there is a false positive it can be discussed with the others and for this specific case (or in generell) deactivated in codeclimate.
I think this community driven coding style guide looks promising. There is also good tool support for example to comment automatically on style violations in GitHub pull requests. Is it worth a try?