An extension of RuboCop for redis/redis-rb Redis client.
You can read a lot more about rubocop-redis in its docs.
Add this line to your application's Gemfile:
gem 'rubocop-redis'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install rubocop-redis
You need to tell RuboCop to load the Redis extension. There are three ways to do this:
Put this into your .rubocop.yml
.
require: rubocop-redis
Alternatively, use the following array notation when specifying multiple extensions.
require:
- rubocop-other-extension
- rubocop-redis
Now you can run rubocop
and it will automatically load the rubocop-redis
cops together with the standard cops.
rubocop --require rubocop-redis
RuboCop::RakeTask.new do |task|
task.requires << 'rubocop-redis'
end
Bug reports and pull requests are welcome on GitHub at https://github.com/9sako6/rubocop-redis.
The gem is available as open source under the terms of the MIT License.