From 293e1e0f38bbe7354a7ea5ca7f6ec96bfca97d2b Mon Sep 17 00:00:00 2001 From: Tom Johnson Date: Fri, 25 Jan 2019 16:19:03 -0800 Subject: [PATCH 1/2] Update RuboCop versions in preparation for 2.0.0 --- bixby.gemspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bixby.gemspec b/bixby.gemspec index 2822e4b..43eca3b 100644 --- a/bixby.gemspec +++ b/bixby.gemspec @@ -13,6 +13,6 @@ Gem::Specification.new do |spec| spec.version = '1.0.0' spec.license = 'Apache-2.0' - spec.add_dependency 'rubocop', '~> 0.50', '<= 0.52.1' - spec.add_dependency 'rubocop-rspec', '~> 1.22', '<= 1.22.2' + spec.add_dependency 'rubocop', '0.63.1' + spec.add_dependency 'rubocop-rspec', '1.31.0' end From 5239f476aa30a8ea1c01d4d9f598d15954a6e47a Mon Sep 17 00:00:00 2001 From: Tom Johnson Date: Tue, 29 Jan 2019 06:04:18 -0800 Subject: [PATCH 2/2] Update rules for latest Rubocop Update rule names and namespaces for existing Rubocop rules in preparation for 2.0.0. --- bixby.gemspec | 2 +- bixby_default.yml | 54 +++++++++++++++++++++-------------------------- 2 files changed, 25 insertions(+), 31 deletions(-) diff --git a/bixby.gemspec b/bixby.gemspec index 43eca3b..6342efd 100644 --- a/bixby.gemspec +++ b/bixby.gemspec @@ -10,7 +10,7 @@ Gem::Specification.new do |spec| spec.name = 'bixby' spec.require_paths = ['lib'] - spec.version = '1.0.0' + spec.version = '2.0.0-beta1' spec.license = 'Apache-2.0' spec.add_dependency 'rubocop', '0.63.1' diff --git a/bixby_default.yml b/bixby_default.yml index edeeea2..2a6679a 100644 --- a/bixby_default.yml +++ b/bixby_default.yml @@ -1,10 +1,7 @@ AllCops: - TargetRubyVersion: 2.1 + TargetRubyVersion: 2.3 DisabledByDefault: true DisplayCopNames: true - Include: - - '**/Rakefile' - - '**/config.ru' Exclude: - 'db/**/*' - 'script/**/*' @@ -15,8 +12,6 @@ inherit_from: - bixby_rails_enabled.yml - bixby_rspec_enabled.yml -# These are all the cops that are enabled in the default configuration. - Style/Alias: Enabled: true @@ -122,9 +117,6 @@ Style/EvenOdd: Style/FrozenStringLiteralComment: Enabled: true -Style/FlipFlop: - Enabled: true - Style/For: Enabled: true @@ -173,7 +165,10 @@ Style/MethodCallWithoutArgsParentheses: Style/MethodDefParentheses: Enabled: true -Style/MethodMissing: +Style/MethodMissingSuper: + Enabled: true + +Style/MissingRespondToMissing: Enabled: true Style/ModuleFunction: @@ -328,7 +323,10 @@ Style/TernaryParentheses: Style/TrailingCommaInArguments: Enabled: true -Style/TrailingCommaInLiteral: +Style/TrailingCommaInArrayLiteral: + Enabled: true + +Style/TrailingCommaInHashLiteral: Enabled: true Style/TrivialAccessors: @@ -376,6 +374,9 @@ Layout/AlignHash: Layout/AlignParameters: Enabled: true +Layout/BlockAlignment: + Enabled: true + Layout/BlockEndNewline: Enabled: true @@ -385,15 +386,24 @@ Layout/CaseIndentation: Layout/ClosingParenthesisIndentation: Enabled: true +Layout/ConditionPosition: + Enabled: true + Layout/CommentIndentation: Enabled: true +Layout/DefEndAlignment: + Enabled: true + Layout/DotPosition: Enabled: true Layout/ElseAlignment: Enabled: true +Layout/EndAlignment: + Enabled: true + Layout/EmptyLineBetweenDefs: Enabled: true @@ -645,21 +655,12 @@ Lint/AmbiguousRegexpLiteral: Lint/AssignmentInCondition: Enabled: true -Lint/BlockAlignment: - Enabled: true - Lint/CircularArgumentReference: Enabled: true -Lint/ConditionPosition: - Enabled: true - Lint/Debugger: Enabled: true -Lint/DefEndAlignment: - Enabled: true - Lint/DeprecatedClassMethods: Enabled: true @@ -691,15 +692,15 @@ Lint/EmptyInterpolation: Lint/EmptyWhen: Enabled: true -Lint/EndAlignment: - Enabled: true - Lint/EndInMethod: Enabled: true Lint/EnsureReturn: Enabled: true +Lint/FlipFlop: + Enabled: true + Lint/FloatOutOfRange: Enabled: true @@ -776,9 +777,6 @@ Lint/UnderscorePrefixedVariableName: Lint/UnifiedInteger: Enabled: true -Lint/UnneededDisable: - Enabled: true - Lint/UnneededSplatExpansion: Enabled: true @@ -856,10 +854,6 @@ Performance/FlatMap: # This can be dangerous since `flat_map` will only flatten 1 level, and # `flatten` without any parameters can flatten multiple levels. -Performance/HashEachMethods: - Enabled: true - AutoCorrect: false - Performance/LstripRstrip: Enabled: true