-
Type: Improvement
-
Resolution: Won't Do
-
Priority: Unknown
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
Let's install Rubocop on all Ruby projects (Mongoid first) to improve code quality and performance. I'm happy to contribute to the work if the team can commit to reviewing the PRs in a timely fashion.
My proposal is:
- Install Rubocop to latest and TargetRubyVersion to 2.5
- Run autogen command to make rubocop-todo.yml. This whitelists all existing issues in your code, so that Rubocop passes.
- Add Rubocop to the CI, so that new PRs must conform to Rubocop standards.
- Fix one "cop" (check) per PR across entire codebase.
- PRs must only change code syntax without affecting functionality.
- Try to adopt the best-practice conventions from Rubocop. For example, %w(...) will change to %w[...], etc.
I've done this on many gems and my own application many times, so I'm confident we can get a good result with no functional impact.
- is related to
-
MONGOID-5304 Add static code analysis tool
- Closed