Performance optimization analysis for Ruby code, as a RuboCop extension
open sourceMITfree
RuboCop Performance is an official extension to RuboCop that adds about 50 cops which flag slow Ruby idioms and suggest faster equivalents. It's loaded as a RuboCop plugin from .rubocop.yml, the command line or a Rake task, and its cops are configured like RuboCop's own. Installed as the rubocop-performance gem; MIT licence, from the RuboCop project.
Problems it solves
- catch slow Ruby code patterns automatically in code review
- have my Ruby linter suggest faster equivalents for common methods
- find allocation-heavy and slow string and array code in a Rails app with a linter
Features
- about 50 cops that flag slow Ruby idioms
- loads as a RuboCop plugin from .rubocop.yml, the command line or a Rake task
- cops configured and disabled like RuboCop's own
Alternatives
The same job
These do what RuboCop Performance does.
- RuboCop Rails RuboCop extension with cops for Rails best practices and conventions
- RuboCop A Ruby static code analyzer and formatter, based on the community Ruby style guide.
- Standard Ruby Unconfigurable Ruby linter and formatter built on RuboCop
- RuboCop RSpec RuboCop extension with cops for RSpec test files
- Herb A modern templating language for the HTML+ERB you already have.
- Reek Code smell detector for Ruby
