Barcoo's shared RuboCop configuration and cops.
Add this line to your application's Gemfile
:
group :development, :test do
gem 'barcoop', require: false
end
Or to your gem's gemspec
file:
spec.add_development_dependency 'barcoop'
To use it just add the following line to your .rubocop.yml
file:
inherit_gem:
barcoop: conf/rubocop.yml
If your project is a Rails app or engine, use rubocop_rails.yml
inherit_gem:
barcoop: conf/rubocop_rails.yml
This gems provides the following cops:
AvoidFixtures: Avoid using fixtures, use FactoryGirl
instead
AvoidRailsEnv: Avoid using Rails.env.environment?
and prefer adding a feature flag in a configuration file.
AvoidTimeout: Timeout.timeout
is not thread safe, see https://www.mikeperham.com/2015/05/08/timeout-rubys-most-dangerous-api/