debian-mirror-gitlab/rubocop/ext/variable_force.rb

18 lines
334 B
Ruby
Raw Normal View History

2022-11-25 23:54:43 +05:30
# frozen_string_literal: true
module RuboCop
module Ext
module VariableForce
def scanned_node?(node)
scanned_nodes.include?(node)
end
def scanned_nodes
@scanned_nodes ||= Set.new.compare_by_identity
end
end
end
end
RuboCop::Cop::VariableForce.prepend RuboCop::Ext::VariableForce