lint: improve Rubocop detection

Instead on relying on the environment, we try to load the Rubocop cop
only if Rubocop is currently loaded.
This commit is contained in:
Pierre de La Morinerie 2020-02-03 11:08:47 +01:00
parent a6b337c436
commit cbaa584bd0

View file

@ -1,4 +1,4 @@
if ENV["RAILS_ENV"] == "development" if defined?(RuboCop)
module RuboCop module RuboCop
module Cop module Cop
module DS module DS