Skip to content

Commit

Permalink
Add rubocop as development dependency
Browse files Browse the repository at this point in the history
Re-introduce rubocop as per issue prometheus#132 and pin to a specific style guide
used by GoCardless and open-sourced at gocardless/gc_ruboconfig. This
should reduce the frequency that style guidelines change between
versions.
  • Loading branch information
lawrencejones committed Jun 17, 2019
1 parent 3652cf7 commit 6f8721c
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
26 changes: 26 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
inherit_gem:
gc_ruboconfig: rubocop.yml

# Set this to be the oldest supported version of Ruby for this library. See
# COMPATIBILITY.md for our compatibility and deprecation policy.
AllCops:
TargetRubyVersion: 2.4

Metrics/MethodLength:
Max: 15

Style/RescueStandardError:
Exclude:
- "*/**/*_spec.rb"

Naming/UncommunicativeMethodParamName:
AllowedNames:
# These are the default allowed names, set by Rubocop
- io
- id
# These are some custom names that we want to allow, since they aren't
# uncommunicative - they're actually rather meaningful!
- as
# This is our increment kwarg for Prometheus metrics
- by
4 changes: 3 additions & 1 deletion prometheus-client.gemspec
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# -*- encoding: utf-8 -*-
# frozen_string_literal: true

$LOAD_PATH.push File.expand_path('../lib', __FILE__)
require 'prometheus/client/version'

Expand All @@ -18,4 +19,5 @@ Gem::Specification.new do |s|
s.add_dependency 'concurrent-ruby'

s.add_development_dependency 'benchmark-ips'
s.add_development_dependency 'gc_ruboconfig', '= 2.4.0'
end

0 comments on commit 6f8721c

Please sign in to comment.