Class: Gitlab::Styles::Rubocop::Cop::WithoutReactiveCache

Inherits:
RuboCop::Cop::Cop
  • Object
show all
Defined in:
lib/gitlab/styles/rubocop/cop/without_reactive_cache.rb

Overview

Cop that prevents the use of ‘without_reactive_cache`

Constant Summary collapse

MSG =
'without_reactive_cache is for debugging purposes only. Please use with_reactive_cache.'

Instance Method Summary collapse

Instance Method Details

#on_send(node) ⇒ Object



11
12
13
14
15
# File 'lib/gitlab/styles/rubocop/cop/without_reactive_cache.rb', line 11

def on_send(node)
  return unless node.children[1] == :without_reactive_cache

  add_offense(node, location: :selector)
end