class RuboCop::Cop::Style::UnneededPercentQ

def check(node)

def check(node)
  src = node.source
  return unless start_with_percent_q_variant?(src)
  return if src.include?(SINGLE_QUOTE) && src.include?(QUOTE)
  if src.start_with?(PERCENT_Q) && src =~ STRING_INTERPOLATION_REGEXP
    return
  end
  if src.start_with?(PERCENT_CAPITAL_Q) && acceptable_capital_q?(node)
    return
  end
  add_offense(node, :expression)
end