Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
R

rubocop-performance

> 数据库
Open source

An extension of RuboCop focused on code performance checks.

738 stars0 likes1 views
WebsiteGitHub

About

An extension of RuboCop focused on code performance checks.

RuboCop Performance

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

Installation

Just install the rubocop-performance gem

bash
$ gem install rubocop-performance

or if you use bundler put this in your Gemfile

ruby
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.

yaml
plugins: rubocop-performance

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

yaml
plugins:
  - rubocop-other-extension
  - rubocop-performance

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

[!NOTE] The plugin system is supported in RuboCop 1.72+. In earlier versions, use require instead of plugins.

Command line

bash
$ rubocop --plugin rubocop-performance

Rake task

ruby
require 'rubocop/rake_task'

RuboCop::RakeTask.new do |task|
  task.plugins << '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:

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

Documentation

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

Compatibility

RuboCop Performance is compatible with RuboCop core.

See the compatibility documentation for further details.

Note: Performance cops are all MRI focused and are highly dependent of the version of MRI you're using.

Contributing

Checkout the contribution guidelines.

License

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

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Rubycode-formatterhacktoberfestlinterrubocop

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category数据库
PricingOpen source

> Related tools

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库