Commit 27f8b5c1 authored by Stan Hu's avatar Stan Hu

Add Rubocop exceptions

Because we dynamically create these probes, we just allow these unused
arguments.
parent 51742648
......@@ -35,7 +35,7 @@ module GitLab
# The prober which is called when gathering metrics
class RemoteMirrorsProber
def initialize(opts, metrics: PrometheusMetrics.new, logger: nil)
def initialize(opts, metrics: PrometheusMetrics.new, logger: nil) # rubocop:disable Lint/UnusedMethodArgument
@metrics = metrics
@collector = RemoteMirrorsCollector.new(
connection_string: opts[:connection_string],
......
......@@ -212,7 +212,7 @@ module GitLab
# The prober which is called when gathering metrics
class RowCountProber
def initialize(opts, metrics: PrometheusMetrics.new, logger: nil)
def initialize(opts, metrics: PrometheusMetrics.new, logger: nil) # rubocop:disable Lint/UnusedMethodArgument
@metrics = metrics
@collector = RowCountCollector.new(
connection_string: opts[:connection_string],
......
......@@ -62,7 +62,7 @@ module GitLab
# Optionally takes a metrics object which by default is a PrometheusMetrics, useful to change the
# metrics writer to something else.
class GitProber
def initialize(opts, metrics: PrometheusMetrics.new, logger: nil)
def initialize(opts, metrics: PrometheusMetrics.new, logger: nil) # rubocop:disable Lint/UnusedMethodArgument
@metrics = metrics
@labels = opts[:labels] || {}
@git = Git.new(opts[:source])
......@@ -85,7 +85,7 @@ module GitLab
# A special prober for git processes
class GitProcessProber
def initialize(opts, metrics: PrometheusMetrics.new, logger: nil)
def initialize(opts, metrics: PrometheusMetrics.new, logger: nil) # rubocop:disable Lint/UnusedMethodArgument
@opts = opts
@metrics = metrics
end
......
......@@ -59,7 +59,7 @@ module GitLab
# Probes a process for info then writes metrics to a target
class ProcessProber
def initialize(options, metrics: PrometheusMetrics.new, logger: nil)
def initialize(options, metrics: PrometheusMetrics.new, logger: nil) # rubocop:disable Lint/UnusedMethodArgument
@metrics = metrics
@name = options[:name]
@pids = if options[:pid_or_pattern] =~ /^\d+$/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment