Rubocop is a cool tool for maintaining style consistency across a codebase. Most rules that it enforces are configurable via rules in .rubocop.yml, so if something is producing too much noise or we disagree with something, just tweak the rules.
Rubocop can auto-correct some things it catches (but not everything): rubocop -a
And rubocop knows about Rails-specific style guides: rubocop -R
All in all, I usually run rubocop -aR before committing new code.
Rubocop is a cool tool for maintaining style consistency across a codebase. Most rules that it enforces are configurable via rules in
.rubocop.yml
, so if something is producing too much noise or we disagree with something, just tweak the rules.Rubocop can auto-correct some things it catches (but not everything):
rubocop -a
And rubocop knows about Rails-specific style guides:
rubocop -R
All in all, I usually run
rubocop -aR
before committing new code.