From cd9960d4f601fd4c5c79d9b7d4223de2f7aa195f Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Thu, 28 Jan 2021 09:08:11 -0800 Subject: [PATCH 1/2] Update RuboCop to 1.9.0 Signed-off-by: Tim Smith --- lib/chefstyle/version.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/chefstyle/version.rb b/lib/chefstyle/version.rb index b6079a6..d20829e 100644 --- a/lib/chefstyle/version.rb +++ b/lib/chefstyle/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Chefstyle VERSION = "1.6.0" - RUBOCOP_VERSION = "1.8.1" -end \ No newline at end of file + RUBOCOP_VERSION = "1.9.0" +end From b4beec519be38c002a4275b0cacef2eb02e88c83 Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Thu, 28 Jan 2021 09:08:23 -0800 Subject: [PATCH 2/2] Vendor rubocop-1.9.0 upstream configuration. Obvious fix; these changes are the result of automation not creative thinking. --- config/disable_all.yml | 10 ++++++++++ config/upstream.yml | 38 ++++++++++++++++++++++++++++++++++---- 2 files changed, 44 insertions(+), 4 deletions(-) diff --git a/config/disable_all.yml b/config/disable_all.yml index 40a5e7a..c7eb36f 100644 --- a/config/disable_all.yml +++ b/config/disable_all.yml @@ -327,6 +327,10 @@ Lint/NonLocalExitFromIterator: Enabled: false Lint/NumberConversion: Enabled: false +Lint/NumberedParameterAssignment: + Enabled: false +Lint/OrAssignmentToConstant: + Enabled: false Lint/OrderedMagicComments: Enabled: false Lint/OutOfRangeRegexpRef: @@ -391,6 +395,8 @@ Lint/StructNewOverride: Enabled: false Lint/SuppressedException: Enabled: false +Lint/SymbolConversion: + Enabled: false Lint/Syntax: Enabled: false Lint/ToEnumArguments: @@ -401,6 +407,8 @@ Lint/TopLevelReturnWithArgument: Enabled: false Lint/TrailingCommaInAttributeDeclaration: Enabled: false +Lint/TripleQuotes: + Enabled: false Lint/UnderscorePrefixedVariableName: Enabled: false Lint/UnexpectedBlockArity: @@ -643,6 +651,8 @@ Style/IfUnlessModifier: Enabled: false Style/IfUnlessModifierOfIfUnless: Enabled: false +Style/IfWithBooleanLiteralBranches: + Enabled: false Style/IfWithSemicolon: Enabled: false Style/ImplicitRuntimeError: diff --git a/config/upstream.yml b/config/upstream.yml index b209f76..5cf6a0f 100644 --- a/config/upstream.yml +++ b/config/upstream.yml @@ -1806,6 +1806,17 @@ Lint/NumberConversion: - Time - DateTime +Lint/NumberedParameterAssignment: + Description: 'Checks for uses of numbered parameter assignment.' + Enabled: pending + VersionAdded: '1.9' + +Lint/OrAssignmentToConstant: + Description: 'Checks unintended or-assignment to constant.' + Enabled: pending + Safe: false + VersionAdded: '1.9' + Lint/OrderedMagicComments: Description: 'Checks the proper ordering of magic comments and whether a magic comment is not placed before a shebang.' Enabled: true @@ -2032,12 +2043,16 @@ Lint/SuppressedException: VersionAdded: '0.9' VersionChanged: '0.81' +Lint/SymbolConversion: + Description: 'Checks for unnecessary symbol conversions.' + Enabled: pending + VersionAdded: '1.9' + Lint/Syntax: - Description: 'Checks syntax error.' + Description: 'Checks for syntax errors.' Enabled: true VersionAdded: '0.9' - Lint/ToEnumArguments: Description: 'This cop ensures that `to_enum`/`enum_for`, called for the current method, has correct arguments.' Enabled: pending @@ -2058,6 +2073,11 @@ Lint/TrailingCommaInAttributeDeclaration: Enabled: true VersionAdded: '0.90' +Lint/TripleQuotes: + Description: 'Checks for useless triple quote constructs.' + Enabled: pending + VersionAdded: '1.9' + Lint/UnderscorePrefixedVariableName: Description: 'Do not use prefix `_` for a variable that is used.' Enabled: true @@ -2689,7 +2709,8 @@ Style/AsciiComments: Enabled: true VersionAdded: '0.9' VersionChanged: '0.52' - AllowedChars: [] + AllowedChars: + - © Style/Attr: Description: 'Checks for uses of Module#attr.' @@ -3120,6 +3141,8 @@ Style/DisableCopsWithinSourceCodeDirective: Forbids disabling/enabling cops within source code. Enabled: false VersionAdded: '0.82' + VersionChanged: '1.9' + AllowedCops: [] Style/DocumentDynamicEvalDefinition: Description: >- @@ -3291,7 +3314,8 @@ Style/FloatDivision: Reference: 'https://blog.rubystyle.guide/ruby/2019/06/21/float-division.html' Enabled: true VersionAdded: '0.72' - VersionChanged: '1.6' + VersionChanged: '1.9' + Safe: false EnforcedStyle: single_coerce SupportedStyles: - left_coerce @@ -3339,6 +3363,7 @@ Style/FormatStringToken: MaxUnannotatedPlaceholdersAllowed: 1 VersionAdded: '0.49' VersionChanged: '1.0' + IgnoredMethods: [] Style/FrozenStringLiteralComment: Description: >- @@ -3492,6 +3517,11 @@ Style/IfUnlessModifierOfIfUnless: VersionAdded: '0.39' VersionChanged: '0.87' +Style/IfWithBooleanLiteralBranches: + Description: 'Checks for redundant `if` with boolean literal branches.' + Enabled: pending + VersionAdded: '1.9' + Style/IfWithSemicolon: Description: 'Do not use if x; .... Use the ternary operator instead.' StyleGuide: '#no-semicolon-ifs'