Sha256: aa9e61ca944abc31a856432adf26779e542d5e703ae7d578b8fd1deeae9ad8d1
Contents?: true
Size: 885 Bytes
Versions: 17
Compression:
Stored size: 885 Bytes
Contents
# frozen-string-literal: true require_relative "../rubocop" unless defined?(RuboCop::Cop::StatsD) module RuboCop module Cop module StatsD # 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. class SplatArguments < Cop include RuboCop::Cop::StatsD MSG = "Do not use splat arguments in StatsD metric calls" def on_send(node) if metric_method?(node) if node.arguments.any? { |arg| arg.type == :splat } add_offense(node) end end end end end end end
Version data entries
17 entries across 17 versions & 1 rubygems