sfcma / members

1 stars 1 forks source link

Use rubocop #9

Closed wenley closed 8 years ago

wenley commented 8 years ago

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.

dan-brewster commented 8 years ago

Looks good to me! I promise I have used Ruby and Rubocop before, even if the code doesn't make that very apparent.... :)