-
Notifications
You must be signed in to change notification settings - Fork 123
Add linter #130
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
Add linter #130
Conversation
This behaviour could've been relied on by users, not worth changing.
|
Awesome, this looks great. Let's merge it to unblock the other PRs.
Yeah let's fix those! I don't think it was formatted for a tool, we can definitely switch to using RDoc or YARD here. Is there a reason to prefer one over the other? RDoc does seem more widely used because it's included with Ruby |
|
Also as a follow up here - are there any tools that will automate this? e.g. we use https://github.com/prettier/prettier and https://github.com/google/google-java-format in other languages - is there something similar for Ruby? |
|
If we can't automate it, a static analysis like this is fine as well - maybe we could add it to the CI to enforce it? |
This PR adds a lint step (using rubocop) to the CI process.
All trivial violations have been fixed, and a few not-so-easy to fix items have been left as pending in
rubocop_todo.yml.The only pending item I see as wildly abnormal is the line length - the high numbers are due to comments such as this one. I couldn't recognize the format used for comments - it had special markers like
private:,public:, none that I've seen used in RDoc or YARD markup. If this comment format isn't intentional, I can open another PR to rewrite them in YARD markup.I've tried to split changes into small commits so that they're easier to review.