From cbaa584bd08a61ba2152b7b332441eac8b68abd0 Mon Sep 17 00:00:00 2001 From: Pierre de La Morinerie Date: Mon, 3 Feb 2020 11:08:47 +0100 Subject: [PATCH] lint: improve Rubocop detection Instead on relying on the environment, we try to load the Rubocop cop only if Rubocop is currently loaded. --- lib/cops/unscoped.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cops/unscoped.rb b/lib/cops/unscoped.rb index 2cbfe5f98..f3933a4e0 100644 --- a/lib/cops/unscoped.rb +++ b/lib/cops/unscoped.rb @@ -1,4 +1,4 @@ -if ENV["RAILS_ENV"] == "development" +if defined?(RuboCop) module RuboCop module Cop module DS