From ddf1d32596436a3f0a3a0b20ede61fcf05bf1d0e Mon Sep 17 00:00:00 2001 From: John Harris Date: Wed, 18 Sep 2019 21:02:25 -0500 Subject: [PATCH] Generate Rubocop todo file Generate Rubocop todo file from latest version of Rubocop. Latest version of Rubocop doesn't support Ruby 2.2 (EOL June 2018), so this also updates the Ruby dependency going forward to be Ruby 2.3+. Rubocop todo files help facilitate addressing a large number of style violations by allowing documented violations. The strategy of a todo file is to incrementally address violations while preventing violations of new code. --- .rubocop.yml | 20 +- .rubocop_todo.yml | 755 +++++++++++++++++++++++++++++++++++++++++ unleash-client.gemspec | 4 +- 3 files changed, 770 insertions(+), 9 deletions(-) create mode 100644 .rubocop_todo.yml diff --git a/.rubocop.yml b/.rubocop.yml index 17ba39d8..7ec9430a 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,16 +1,22 @@ +inherit_from: .rubocop_todo.yml + +Layout/SpaceBeforeBlockBraces: + Enabled: false + +# NOTE: Temporarily duplicated from `rubocop_todo.yml` because many files exceed +# 120 characters +# Metrics/LineLength: +# Max: 120 + Naming/PredicateName: NameWhitelist: - is_enabled? -Metrics/LineLength: - Max: 120 - -Style/RedundantSelf: - Enabled: false Style/PreferredHashMethods: Enabled: false -Style/StringLiterals: + +Style/RedundantSelf: Enabled: false -Layout/SpaceBeforeBlockBraces: +Style/StringLiterals: Enabled: false diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml new file mode 100644 index 00000000..b1a57713 --- /dev/null +++ b/.rubocop_todo.yml @@ -0,0 +1,755 @@ +# This configuration was generated by +# `rubocop --auto-gen-config --exclude-limit 1000` +# on 2019-09-18 20:34:49 -0500 using RuboCop version 0.74.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: 1 +# Cop supports --auto-correct. +# Configuration parameters: TreatCommentsAsGroupSeparators, Include. +# Include: **/*.gemspec +Gemspec/OrderedDependencies: + Exclude: + - 'unleash-client.gemspec' + +# Offense count: 13 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, IndentationWidth. +# SupportedStyles: with_first_argument, with_fixed_indentation +Layout/AlignArguments: + Exclude: + - 'lib/unleash/configuration.rb' + +# Offense count: 45 +# Cop supports --auto-correct. +# Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle. +# SupportedHashRocketStyles: key, separator, table +# SupportedColonStyles: key, separator, table +# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit +Layout/AlignHash: + Exclude: + - 'examples/simple.rb' + - 'lib/unleash/client.rb' + - 'spec/unleash/client_spec.rb' + - 'spec/unleash/configuration_spec.rb' + +# Offense count: 10 +# Cop supports --auto-correct. +Layout/BlockEndNewline: + Exclude: + - 'spec/unleash/configuration_spec.rb' + - 'spec/unleash/feature_toggle_spec.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +Layout/ClosingParenthesisIndentation: + Exclude: + - 'examples/simple.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +Layout/CommentIndentation: + Exclude: + - 'spec/unleash/feature_toggle_spec.rb' + +# Offense count: 3 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle. +# SupportedStyles: leading, trailing +Layout/DotPosition: + Exclude: + - 'spec/unleash/client_spec.rb' + +# Offense count: 2 +# Cop supports --auto-correct. +Layout/EmptyLineAfterGuardClause: + Exclude: + - 'lib/unleash/feature_toggle.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +Layout/EmptyLineAfterMagicComment: + Exclude: + - 'unleash-client.gemspec' + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: AllowAdjacentOneLineDefs, NumberOfEmptyLines. +Layout/EmptyLineBetweenDefs: + Exclude: + - 'lib/unleash/client.rb' + +# Offense count: 14 +# Cop supports --auto-correct. +Layout/EmptyLines: + Exclude: + - 'bin/unleash-client' + - 'lib/unleash/client.rb' + - 'lib/unleash/configuration.rb' + - 'lib/unleash/variant_definition.rb' + - 'spec/unleash/client_spec.rb' + - 'spec/unleash/client_specification_spec.rb' + - 'spec/unleash/feature_toggle_spec.rb' + - 'spec/unleash/metrics_spec.rb' + - 'spec/unleash_spec.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle. +# SupportedStyles: around, only_before +Layout/EmptyLinesAroundAccessModifier: + Exclude: + - 'lib/unleash/client.rb' + +# Offense count: 8 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle. +# SupportedStyles: empty_lines, no_empty_lines +Layout/EmptyLinesAroundBlockBody: + Exclude: + - 'spec/unleash/client_specification_spec.rb' + - 'spec/unleash/configuration_spec.rb' + - 'spec/unleash/feature_toggle_spec.rb' + - 'spec/unleash/metrics_spec.rb' + - 'spec/unleash/strategy/gradual_rollout_sessionid_spec.rb' + - 'spec/unleash/strategy/gradual_rollout_userid_spec.rb' + - 'spec/unleash/strategy/util_spec.rb' + +# Offense count: 2 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle. +# SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines, beginning_only, ending_only +Layout/EmptyLinesAroundClassBody: + Exclude: + - 'lib/unleash/configuration.rb' + - 'lib/unleash/variant.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +Layout/EmptyLinesAroundMethodBody: + Exclude: + - 'lib/unleash/metrics_reporter.rb' + +# Offense count: 7 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle. +# SupportedStyles: empty_lines, empty_lines_except_namespace, empty_lines_special, no_empty_lines +Layout/EmptyLinesAroundModuleBody: + Exclude: + - 'lib/unleash.rb' + - 'lib/unleash/client.rb' + - 'lib/unleash/context.rb' + - 'lib/unleash/metrics.rb' + - 'lib/unleash/metrics_reporter.rb' + - 'lib/unleash/scheduled_executor.rb' + - 'lib/unleash/toggle_fetcher.rb' + +# Offense count: 3 +# Cop supports --auto-correct. +# Configuration parameters: AllowForAlignment, AllowBeforeTrailingComments, ForceEqualSignAlignment. +Layout/ExtraSpacing: + Exclude: + - 'lib/unleash/configuration.rb' + - 'spec/unleash/client_spec.rb' + - 'spec/unleash/strategy/base_spec.rb' + +# Offense count: 8 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, IndentationWidth. +# SupportedStyles: special_inside_parentheses, consistent, align_braces +Layout/IndentFirstHashElement: + Exclude: + - 'spec/unleash/client_spec.rb' + - 'spec/unleash/configuration_spec.rb' + - 'spec/unleash/feature_toggle_spec.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: Width, IgnoredPatterns. +Layout/IndentationWidth: + Exclude: + - 'lib/unleash/client.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +Layout/LeadingBlankLines: + Exclude: + - 'lib/unleash/variant.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: AllowDoxygenCommentStyle. +Layout/LeadingCommentSpace: + Exclude: + - 'lib/unleash/feature_toggle.rb' + +# Offense count: 10 +# Cop supports --auto-correct. +Layout/MultilineBlockLayout: + Exclude: + - 'spec/unleash/configuration_spec.rb' + - 'spec/unleash/feature_toggle_spec.rb' + +# Offense count: 9 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle. +# SupportedStyles: symmetrical, new_line, same_line +Layout/MultilineMethodCallBraceLayout: + Exclude: + - 'examples/simple.rb' + - 'spec/unleash/client_spec.rb' + - 'spec/unleash/configuration_spec.rb' + +# Offense count: 25 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, IndentationWidth. +# SupportedStyles: aligned, indented, indented_relative_to_receiver +Layout/MultilineMethodCallIndentation: + Exclude: + - 'lib/unleash.rb' + - 'lib/unleash/feature_toggle.rb' + - 'lib/unleash/variant_definition.rb' + - 'spec/unleash/client_spec.rb' + - 'spec/unleash/configuration_spec.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, IndentationWidth. +# SupportedStyles: aligned, indented +Layout/MultilineOperationIndentation: + Exclude: + - 'lib/unleash/feature_toggle.rb' + +# Offense count: 13 +# Cop supports --auto-correct. +Layout/SpaceAfterColon: + Exclude: + - 'spec/unleash/feature_toggle_spec.rb' + +# Offense count: 10 +# Cop supports --auto-correct. +Layout/SpaceAfterComma: + Exclude: + - 'bin/unleash-client' + - 'lib/unleash/metrics_reporter.rb' + - 'spec/unleash/context_spec.rb' + - 'spec/unleash/feature_toggle_spec.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +Layout/SpaceAfterNot: + Exclude: + - 'lib/unleash/toggle_fetcher.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle. +# SupportedStyles: space, no_space +Layout/SpaceAroundEqualsInParameterDefault: + Exclude: + - 'lib/unleash/feature_toggle.rb' + +# Offense count: 50 +# Cop supports --auto-correct. +# Configuration parameters: AllowForAlignment. +Layout/SpaceAroundOperators: + Exclude: + - 'lib/unleash/configuration.rb' + - 'spec/unleash/client_spec.rb' + - 'spec/unleash/configuration_spec.rb' + - 'spec/unleash/strategy/application_hostname_spec.rb' + - 'spec/unleash/strategy/user_with_id_spec.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: AllowForAlignment. +Layout/SpaceBeforeFirstArg: + Exclude: + - 'spec/unleash/strategy/base_spec.rb' + +# Offense count: 144 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBraces. +# SupportedStyles: space, no_space, compact +# SupportedStylesForEmptyBraces: space, no_space +Layout/SpaceInsideHashLiteralBraces: + Exclude: + - 'lib/unleash/metrics.rb' + - 'spec/unleash/client_spec.rb' + - 'spec/unleash/configuration_spec.rb' + - 'spec/unleash/context_spec.rb' + - 'spec/unleash/feature_toggle_spec.rb' + - 'spec/unleash/strategy/application_hostname_spec.rb' + - 'spec/unleash/strategy/gradual_rollout_random_spec.rb' + - 'spec/unleash/strategy/gradual_rollout_sessionid_spec.rb' + - 'spec/unleash/strategy/gradual_rollout_userid_spec.rb' + - 'spec/unleash/strategy/remote_address_spec.rb' + - 'spec/unleash/strategy/user_with_id_spec.rb' + +# Offense count: 20 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle. +# SupportedStyles: space, no_space +Layout/SpaceInsideParens: + Exclude: + - 'bin/unleash-client' + - 'examples/simple.rb' + - 'lib/unleash/context.rb' + - 'lib/unleash/feature_toggle.rb' + - 'spec/unleash/client_spec.rb' + +# Offense count: 7 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle. +# SupportedStyles: final_newline, final_blank_line +Layout/TrailingBlankLines: + Exclude: + - 'examples/simple.rb' + - 'spec/unleash/strategy/application_hostname_spec.rb' + - 'spec/unleash/strategy/base_spec.rb' + - 'spec/unleash/strategy/default_spec.rb' + - 'spec/unleash/strategy/remote_address_spec.rb' + - 'spec/unleash/strategy/user_with_id_spec.rb' + - 'spec/unleash/strategy/util_spec.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle. +# SupportedStyles: runtime_error, standard_error +Lint/InheritException: + Exclude: + - 'lib/unleash/strategy/base.rb' + +# Offense count: 5 +Lint/RescueException: + Exclude: + - 'lib/unleash/client.rb' + - 'lib/unleash/scheduled_executor.rb' + - 'lib/unleash/toggle_fetcher.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +Lint/UnneededRequireStatement: + Exclude: + - 'lib/unleash/toggle_fetcher.rb' + +# Offense count: 3 +# Cop supports --auto-correct. +# Configuration parameters: IgnoreEmptyBlocks, AllowUnusedKeywordArguments. +Lint/UnusedBlockArgument: + Exclude: + - 'bin/unleash-client' + - 'lib/unleash/configuration.rb' + +# Offense count: 6 +# Cop supports --auto-correct. +# Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods. +Lint/UnusedMethodArgument: + Exclude: + - 'lib/unleash/client.rb' + - 'lib/unleash/scheduled_executor.rb' + - 'lib/unleash/strategy/base.rb' + - 'lib/unleash/strategy/default.rb' + +# Offense count: 6 +Lint/UselessAssignment: + Exclude: + - 'bin/unleash-client' + - 'lib/unleash/client.rb' + - 'lib/unleash/strategy/gradual_rollout_random.rb' + - 'lib/unleash/toggle_fetcher.rb' + - 'spec/unleash/client_spec.rb' + +# Offense count: 17 +Metrics/AbcSize: + Max: 50 + +# Offense count: 21 +# Configuration parameters: CountComments, ExcludedMethods. +# ExcludedMethods: refine +Metrics/BlockLength: + Max: 290 + +# Offense count: 2 +# Configuration parameters: CountComments. +Metrics/ClassLength: + Max: 105 + +# Offense count: 8 +Metrics/CyclomaticComplexity: + Max: 19 + +# Offense count: 28 +# Cop supports --auto-correct. +# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns. +# URISchemes: http, https +Metrics/LineLength: + Max: 120 + Exclude: + - 'lib/unleash/client.rb' + - 'lib/unleash/context.rb' + - 'lib/unleash/feature_toggle.rb' + - 'lib/unleash/metrics_reporter.rb' + - 'lib/unleash/scheduled_executor.rb' + - 'spec/unleash/feature_toggle_spec.rb' + +# Offense count: 17 +# Configuration parameters: CountComments, ExcludedMethods. +Metrics/MethodLength: + Max: 28 + +# Offense count: 8 +Metrics/PerceivedComplexity: + Max: 20 + +# Offense count: 2 +Naming/AccessorMethodName: + Exclude: + - 'lib/unleash/configuration.rb' + - 'lib/unleash/feature_toggle.rb' + +# Offense count: 1 +Naming/BinaryOperatorParameterName: + Exclude: + - 'lib/unleash/variant.rb' + +# Offense count: 1 +# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames. +# AllowedNames: io, id, to, by, on, in, at, ip, db +Naming/UncommunicativeMethodParamName: + Exclude: + - 'lib/unleash/variant.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle. +# SupportedStyles: prefer_alias, prefer_alias_method +Style/Alias: + Exclude: + - 'lib/unleash/client.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle. +# SupportedStyles: always, conditionals +Style/AndOr: + Exclude: + - 'lib/unleash/configuration.rb' + +# Offense count: 14 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, ProceduralMethods, FunctionalMethods, IgnoredMethods, AllowBracesOnProceduralOneLiners. +# SupportedStyles: line_count_based, semantic, braces_for_chaining, always_braces +# ProceduralMethods: benchmark, bm, bmbm, create, each_with_object, measure, new, realtime, tap, with_object +# FunctionalMethods: let, let!, subject, watch +# IgnoredMethods: lambda, proc, it +Style/BlockDelimiters: + Exclude: + - 'lib/unleash.rb' + - 'lib/unleash/feature_toggle.rb' + - 'spec/unleash/configuration_spec.rb' + - 'spec/unleash/feature_toggle_spec.rb' + +# Offense count: 21 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle. +# SupportedStyles: braces, no_braces, context_dependent +Style/BracesAroundHashParameters: + Exclude: + - 'spec/unleash/configuration_spec.rb' + - 'spec/unleash/context_spec.rb' + - 'spec/unleash/strategy/application_hostname_spec.rb' + - 'spec/unleash/strategy/gradual_rollout_random_spec.rb' + - 'spec/unleash/strategy/gradual_rollout_userid_spec.rb' + - 'spec/unleash/strategy/remote_address_spec.rb' + - 'spec/unleash/strategy/user_with_id_spec.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +Style/ColonMethodCall: + Exclude: + - 'lib/unleash.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +Style/DefWithParentheses: + Exclude: + - 'lib/unleash.rb' + +# Offense count: 22 +Style/Documentation: + Exclude: + - 'spec/**/*' + - 'test/**/*' + - 'lib/unleash.rb' + - 'lib/unleash/activation_strategy.rb' + - 'lib/unleash/client.rb' + - 'lib/unleash/configuration.rb' + - 'lib/unleash/context.rb' + - 'lib/unleash/feature_toggle.rb' + - 'lib/unleash/metrics.rb' + - 'lib/unleash/metrics_reporter.rb' + - 'lib/unleash/scheduled_executor.rb' + - 'lib/unleash/strategy/application_hostname.rb' + - 'lib/unleash/strategy/base.rb' + - 'lib/unleash/strategy/default.rb' + - 'lib/unleash/strategy/gradual_rollout_random.rb' + - 'lib/unleash/strategy/gradual_rollout_sessionid.rb' + - 'lib/unleash/strategy/gradual_rollout_userid.rb' + - 'lib/unleash/strategy/remote_address.rb' + - 'lib/unleash/strategy/user_with_id.rb' + - 'lib/unleash/strategy/util.rb' + - 'lib/unleash/toggle_fetcher.rb' + - 'lib/unleash/variant.rb' + - 'lib/unleash/variant_definition.rb' + - 'lib/unleash/variant_override.rb' + +# Offense count: 2 +# Cop supports --auto-correct. +Style/EmptyLiteral: + Exclude: + - 'spec/unleash/context_spec.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +Style/Encoding: + Exclude: + - 'unleash-client.gemspec' + +# Offense count: 1 +# Cop supports --auto-correct. +Style/ExpandPathArguments: + Exclude: + - 'unleash-client.gemspec' + +# Offense count: 49 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle. +# SupportedStyles: always, never +Style/FrozenStringLiteralComment: + Exclude: + - 'Gemfile' + - 'Rakefile' + - 'bin/console' + - 'bin/unleash-client' + - 'examples/simple.rb' + - 'lib/unleash.rb' + - 'lib/unleash/activation_strategy.rb' + - 'lib/unleash/client.rb' + - 'lib/unleash/configuration.rb' + - 'lib/unleash/context.rb' + - 'lib/unleash/feature_toggle.rb' + - 'lib/unleash/metrics.rb' + - 'lib/unleash/metrics_reporter.rb' + - 'lib/unleash/scheduled_executor.rb' + - 'lib/unleash/strategy/application_hostname.rb' + - 'lib/unleash/strategy/base.rb' + - 'lib/unleash/strategy/default.rb' + - 'lib/unleash/strategy/gradual_rollout_random.rb' + - 'lib/unleash/strategy/gradual_rollout_sessionid.rb' + - 'lib/unleash/strategy/gradual_rollout_userid.rb' + - 'lib/unleash/strategy/remote_address.rb' + - 'lib/unleash/strategy/user_with_id.rb' + - 'lib/unleash/strategy/util.rb' + - 'lib/unleash/toggle_fetcher.rb' + - 'lib/unleash/variant.rb' + - 'lib/unleash/variant_definition.rb' + - 'lib/unleash/variant_override.rb' + - 'lib/unleash/version.rb' + - 'spec/spec_helper.rb' + - 'spec/unleash/activation_strategy_spec.rb' + - 'spec/unleash/client_spec.rb' + - 'spec/unleash/client_specification_spec.rb' + - 'spec/unleash/configuration_spec.rb' + - 'spec/unleash/context_spec.rb' + - 'spec/unleash/feature_toggle_spec.rb' + - 'spec/unleash/metrics_spec.rb' + - 'spec/unleash/scheduled_executor_spec.rb' + - 'spec/unleash/strategy/application_hostname_spec.rb' + - 'spec/unleash/strategy/base_spec.rb' + - 'spec/unleash/strategy/default_spec.rb' + - 'spec/unleash/strategy/gradual_rollout_random_spec.rb' + - 'spec/unleash/strategy/gradual_rollout_sessionid_spec.rb' + - 'spec/unleash/strategy/gradual_rollout_userid_spec.rb' + - 'spec/unleash/strategy/remote_address_spec.rb' + - 'spec/unleash/strategy/user_with_id_spec.rb' + - 'spec/unleash/strategy/util_spec.rb' + - 'spec/unleash/variant_override_spec.rb' + - 'spec/unleash_spec.rb' + - 'unleash-client.gemspec' + +# Offense count: 7 +# Configuration parameters: MinBodyLength. +Style/GuardClause: + Exclude: + - 'lib/unleash/client.rb' + - 'lib/unleash/configuration.rb' + - 'lib/unleash/scheduled_executor.rb' + - 'lib/unleash/toggle_fetcher.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols. +# SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys +Style/HashSyntax: + Exclude: + - 'Rakefile' + +# Offense count: 2 +# Configuration parameters: AllowIfModifier. +Style/IfInsideElse: + Exclude: + - 'bin/unleash-client' + +# Offense count: 1 +# Cop supports --auto-correct. +Style/IfUnlessModifier: + Exclude: + - 'lib/unleash/configuration.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: InverseMethods, InverseBlocks. +Style/InverseMethods: + Exclude: + - 'lib/unleash.rb' + +# Offense count: 4 +# Cop supports --auto-correct. +# Configuration parameters: IgnoredMethods. +Style/MethodCallWithoutArgsParentheses: + Exclude: + - 'lib/unleash/feature_toggle.rb' + - 'lib/unleash/metrics_reporter.rb' + - 'spec/unleash/strategy/base_spec.rb' + - 'spec/unleash/strategy/default_spec.rb' + +# Offense count: 4 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyle. +# SupportedStyles: literals, strict +Style/MutableConstant: + Exclude: + - 'lib/unleash/strategy/application_hostname.rb' + - 'lib/unleash/strategy/remote_address.rb' + - 'lib/unleash/strategy/user_with_id.rb' + - 'lib/unleash/version.rb' + +# Offense count: 1 +Style/NestedTernaryOperator: + Exclude: + - 'bin/unleash-client' + +# Offense count: 2 +# Cop supports --auto-correct. +# Configuration parameters: AutoCorrect, EnforcedStyle, IgnoredMethods. +# SupportedStyles: predicate, comparison +Style/NumericPredicate: + Exclude: + - 'spec/**/*' + - 'lib/unleash/strategy/gradual_rollout_sessionid.rb' + - 'lib/unleash/strategy/gradual_rollout_userid.rb' + +# Offense count: 2 +Style/OptionalArguments: + Exclude: + - 'lib/unleash/strategy/gradual_rollout_sessionid.rb' + - 'lib/unleash/strategy/gradual_rollout_userid.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +Style/ParallelAssignment: + Exclude: + - 'lib/unleash/metrics_reporter.rb' + +# Offense count: 2 +# Cop supports --auto-correct. +# Configuration parameters: PreferredDelimiters. +Style/PercentLiteralDelimiters: + Exclude: + - 'unleash-client.gemspec' + +# Offense count: 1 +# Cop supports --auto-correct. +Style/RedundantBegin: + Exclude: + - 'lib/unleash/toggle_fetcher.rb' + +# Offense count: 8 +# Cop supports --auto-correct. +# Configuration parameters: AllowMultipleReturnValues. +Style/RedundantReturn: + Exclude: + - 'lib/unleash/client.rb' + - 'lib/unleash/feature_toggle.rb' + - 'lib/unleash/metrics_reporter.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: ConvertCodeThatCanStartToReturnNil, Whitelist. +# Whitelist: present?, blank?, presence, try, try! +Style/SafeNavigation: + Exclude: + - 'lib/unleash/toggle_fetcher.rb' + +# Offense count: 3 +# Cop supports --auto-correct. +# Configuration parameters: MinSize. +# SupportedStyles: percent, brackets +Style/SymbolArray: + EnforcedStyle: brackets + +# Offense count: 2 +# Cop supports --auto-correct. +# Configuration parameters: IgnoredMethods. +# IgnoredMethods: respond_to, define_method +Style/SymbolProc: + Exclude: + - 'lib/unleash/feature_toggle.rb' + - 'lib/unleash/strategy/application_hostname.rb' + +# Offense count: 3 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyleForMultiline. +# SupportedStylesForMultiline: comma, consistent_comma, no_comma +Style/TrailingCommaInArguments: + Exclude: + - 'bin/unleash-client' + - 'examples/simple.rb' + - 'spec/unleash/context_spec.rb' + +# Offense count: 1 +# Cop supports --auto-correct. +# Configuration parameters: EnforcedStyleForMultiline. +# SupportedStylesForMultiline: comma, consistent_comma, no_comma +Style/TrailingCommaInHashLiteral: + Exclude: + - 'bin/unleash-client' + +# Offense count: 1 +# Cop supports --auto-correct. +Style/UnlessElse: + Exclude: + - 'lib/unleash/client.rb' + +# Offense count: 4 +# Cop supports --auto-correct. +Style/UnneededInterpolation: + Exclude: + - 'spec/unleash/strategy/gradual_rollout_sessionid_spec.rb' + - 'spec/unleash/strategy/gradual_rollout_userid_spec.rb' + +# Offense count: 2 +# Cop supports --auto-correct. +Style/UnneededPercentQ: + Exclude: + - 'unleash-client.gemspec' + +# Offense count: 5 +# Cop supports --auto-correct. +# Configuration parameters: MinSize, WordRegex. +# SupportedStyles: percent, brackets +Style/WordArray: + EnforcedStyle: brackets diff --git a/unleash-client.gemspec b/unleash-client.gemspec index 0d9c28ea..d074446c 100644 --- a/unleash-client.gemspec +++ b/unleash-client.gemspec @@ -22,7 +22,7 @@ Gem::Specification.new do |spec| spec.bindir = "exe" spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) } spec.require_paths = ["lib"] - spec.required_ruby_version = "~> 2.2" + spec.required_ruby_version = "~> 2.3" spec.add_dependency "murmurhash3", "~> 0.1.6" @@ -32,5 +32,5 @@ Gem::Specification.new do |spec| spec.add_development_dependency "rspec-json_expectations", "~> 2.1" spec.add_development_dependency "webmock", "~> 3.0" spec.add_development_dependency "coveralls" - + spec.add_development_dependency "rubocop" end