The only valid measurement of code quality: WTFs/minute
I would like to cover code quality tools I use while developing Rails applications.
Of course you should try CodeClimate service to monitor your project, but…
Let`s overview some open source solutions:
1. Rails Best Practises - RBP
I prefer to add RBP analysis to CI tasks, as following:
while I use my custom RBP template report
config/my_rails_best_practices.html.erb. The RBP report is a part of my CI artifacts.
Alternative 1: ROODI - Ruby Object Oriented Design Inferometer.
roodi -config=config/roodi.yml "app/**/*.rb" "lib/**/*.rb" > roodi_report.txt
Alternative 2: Rubocop
Alternative 3: Cane
Alternative 4: Ruby Lint
2. Code Coverage - SimpleCov
Add the following code to
1 2 3 4 5 6 7 8
export COVERAGE=true before you run your tests.
Your team should apply those guides or define your own. You should also check those Github guides.
4. Rails Security Scanner - Brakeman
Read this blog post by CodeClimate