stripe-ruby/.rubocop_todo.yml
Brandur ebbce668fd Rubocop: Cap method length at 50 lines + disable module length
Remi pointed out in #666 that we basically just have to keep adding more
more onto the `Max` exception for both these rules every time we add a
new API resource.

Here I suggest that we modify the check on method length in two ways:

1. Permanently disable the cop on `Util.object_classes`. This is just
   going to keep growing until we change are approach to it.
2. Choose a more reasonable maximum of 50 lines for elsewhere (IMO, the
   default of 10 is just too short). Most of our methods already come in
   below this, but there's a couple outliers like `#execute_request` in
   `StripeClient`. If we knock over some of those, we could lower this
   number again, but I suspect that we'd probably want somewhere closer
   to 30 (instead of 10) event then.

I also disable the check on module length completely. I'm not convinced
this is a very good heuristic for code quality.
2018-07-27 17:13:07 -07:00

51 lines
1.2 KiB
YAML

# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2018-07-19 14:22:24 +0200 using RuboCop version 0.50.0.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.
# Offense count: 19
Metrics/AbcSize:
Max: 52
# Offense count: 27
# Configuration parameters: CountComments, ExcludedMethods.
Metrics/BlockLength:
Max: 498
# Offense count: 8
# Configuration parameters: CountComments.
Metrics/ClassLength:
Max: 626
# Offense count: 11
Metrics/CyclomaticComplexity:
Max: 15
# Offense count: 278
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
# URISchemes: http, https
Metrics/LineLength:
Max: 310
# Offense count: 6
# Configuration parameters: CountKeywordArgs.
Metrics/ParameterLists:
Max: 7
# Offense count: 5
Metrics/PerceivedComplexity:
Max: 17
# Offense count: 2
Style/ClassVars:
Exclude:
- 'lib/stripe/stripe_object.rb'
- 'test/stripe/api_resource_test.rb'
# Offense count: 56
Style/Documentation:
Enabled: false