Files
gitlab-foss/rubocop/cop/gitlab/without_reactive_cache.rb
2024-10-07 18:14:19 +00:00

19 lines
466 B
Ruby

# frozen_string_literal: true
module RuboCop
module Cop
module Gitlab
# Cop that prevents the use of `without_reactive_cache`
class WithoutReactiveCache < RuboCop::Cop::Base
MSG = 'without_reactive_cache is for debugging purposes only. Please use with_reactive_cache.'
RESTRICT_ON_SEND = %i[without_reactive_cache].freeze
def on_send(node)
add_offense(node.loc.selector)
end
end
end
end
end