class RuboCop::Cop::StatsD::SplatArguments

This Rubocop will check for using splat arguments (*args) in StatsD metric calls. To run this rule on your codebase, invoke Rubocop this way:

rubocop --require \
  `bundle show statsd-instrument`/lib/statsd/instrument/rubocop.rb \
  --only StatsD/SplatArguments

This cop will not autocorrect offenses.

Constants

MSG

Public Instance Methods

on_send(node) click to toggle source
# File lib/statsd/instrument/rubocop/splat_arguments.rb, line 21
def on_send(node)
  if metric_method?(node)
    if node.arguments.any? { |arg| arg.type == :splat }
      add_offense(node)
    end
  end
end