Skip to content

An extension of RuboCop focused on code performance checks.

License

Notifications You must be signed in to change notification settings

fatkodima/rubocop-performance

This branch is 650 commits behind rubocop/rubocop-performance:master.

Folders and files

NameName
Last commit message
Last commit date
Apr 13, 2020
Nov 25, 2019
Jun 9, 2020
Jun 9, 2020
Jun 6, 2020
Jun 9, 2020
Jun 5, 2020
Jun 9, 2020
May 31, 2020
Mar 13, 2019
Oct 11, 2018
Oct 11, 2018
Apr 18, 2020
Jul 27, 2019
Jun 9, 2020
Mar 13, 2019
Dec 31, 2019
Apr 25, 2020
May 30, 2020
Jun 18, 2019
Jun 3, 2020
Mar 14, 2019
May 30, 2020

Repository files navigation

RuboCop Performance

Gem Version CircleCI

Performance optimization analysis for your projects, as an extension to RuboCop.

Installation

Just install the rubocop-performance gem

gem install rubocop-performance

or if you use bundler put this in your Gemfile

gem 'rubocop-performance', require: false

Usage

You need to tell RuboCop to load the Performance extension. There are three ways to do this:

RuboCop configuration file

Put this into your .rubocop.yml.

require: rubocop-performance

Alternatively, use the following array notation when specifying multiple extensions.

require:
  - rubocop-other-extension
  - rubocop-performance

Now you can run rubocop and it will automatically load the RuboCop Performance cops together with the standard cops.

Command line

rubocop --require rubocop-performance

Rake task

RuboCop::RakeTask.new do |task|
  task.requires << 'rubocop-performance'
end

The Cops

All cops are located under lib/rubocop/cop/performance, and contain examples/documentation.

In your .rubocop.yml, you may treat the Performance cops just like any other cop. For example:

Performance/Size:
  Exclude:
    - lib/example.rb

Documentation

You can read a lot more about RuboCop Performance in its official docs.

Contributing

Checkout the contribution guidelines.

License

rubocop-performance is MIT licensed. See the accompanying file for the full text.

About

An extension of RuboCop focused on code performance checks.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Ruby 100.0%