From 23cfe0e6101e7b7cec8aeee70c05dd3a49072f5f Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Fri, 31 Dec 2021 22:42:20 -0500 Subject: [PATCH 1/2] Update to 1.24.1 Signed-off-by: Tim Smith --- lib/chefstyle/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/chefstyle/version.rb b/lib/chefstyle/version.rb index fdb2db5..2306bb9 100644 --- a/lib/chefstyle/version.rb +++ b/lib/chefstyle/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module Chefstyle VERSION = "2.1.3" - RUBOCOP_VERSION = "1.23.0" + RUBOCOP_VERSION = "1.24.1" end From c72bbc6a79ab0859755981f99d76635cd5bc275a Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Fri, 31 Dec 2021 22:42:28 -0500 Subject: [PATCH 2/2] Vendor rubocop-1.24.1 upstream configuration. Obvious fix; these changes are the result of automation not creative thinking. --- config/disable_all.yml | 8 +++++++ config/upstream.yml | 47 +++++++++++++++++++++++++++++++++++++++++- 2 files changed, 54 insertions(+), 1 deletion(-) diff --git a/config/disable_all.yml b/config/disable_all.yml index 01494aa..06c5b09 100644 --- a/config/disable_all.yml +++ b/config/disable_all.yml @@ -491,6 +491,8 @@ Naming/AccessorMethodName: Enabled: false Naming/AsciiIdentifiers: Enabled: false +Naming/BlockForwarding: + Enabled: false Naming/BlockParameterName: Enabled: false Naming/ClassAndModuleCamelCase: @@ -641,6 +643,10 @@ Style/ExplicitBlockArgument: Enabled: false Style/ExponentialNotation: Enabled: false +Style/FileRead: + Enabled: false +Style/FileWrite: + Enabled: false Style/FloatDivision: Enabled: false Style/For: @@ -705,6 +711,8 @@ Style/LambdaCall: Enabled: false Style/LineEndConcatenation: Enabled: false +Style/MapToHash: + Enabled: false Style/MethodCallWithoutArgsParentheses: Enabled: false Style/MethodCallWithArgsParentheses: diff --git a/config/upstream.yml b/config/upstream.yml index 3931881..dfe58ea 100644 --- a/config/upstream.yml +++ b/config/upstream.yml @@ -78,6 +78,8 @@ AllCops: # When specifying style guide URLs, any paths and/or fragments will be # evaluated relative to the base URL. StyleGuideBaseURL: https://rubystyle.guide + # Documentation URLs will be constructed using the base URL. + DocumentationBaseURL: https://docs.rubocop.org/rubocop # Extra details are not displayed in offense messages by default. Change # behavior by overriding ExtraDetails, or by giving the # `-E/--extra-details` option. @@ -449,7 +451,11 @@ Layout/ClosingParenthesisIndentation: Layout/CommentIndentation: Description: 'Indentation of comments.' Enabled: true + # When true, allows comments to have extra indentation if that aligns them + # with a comment on the preceding line. + AllowForAlignment: false VersionAdded: '0.49' + VersionChanged: '1.24' Layout/ConditionPosition: Description: >- @@ -1796,7 +1802,9 @@ Lint/ImplicitStringConcatenation: Lint/IncompatibleIoSelectWithFiberScheduler: Description: 'Checks for `IO.select` that is incompatible with Fiber Scheduler.' Enabled: pending + SafeAutoCorrect: false VersionAdded: '1.21' + VersionChanged: '1.24' Lint/IneffectiveAccessModifier: Description: >- @@ -2479,6 +2487,16 @@ Naming/BinaryOperatorParameterName: VersionAdded: '0.50' VersionChanged: '1.2' +Naming/BlockForwarding: + Description: 'Use anonymous block forwarding.' + StyleGuide: '#block-forwarding' + Enabled: pending + VersionAdded: '1.24' + EnforcedStyle: anonymous + SupportedStyles: + - anonymous + - explicit + Naming/BlockParameterName: Description: >- Checks for block parameter names that contain capital letters, @@ -3492,6 +3510,18 @@ Style/ExponentialNotation: - engineering - integral +Style/FileRead: + Description: 'Favor `File.(bin)read` convenience methods.' + StyleGuide: '#file-read' + Enabled: pending + VersionAdded: '1.24' + +Style/FileWrite: + Description: 'Favor `File.(bin)write` convenience methods.' + StyleGuide: '#file-write' + Enabled: pending + VersionAdded: '1.24' + Style/FloatDivision: Description: 'For performing float division, coerce one side only.' StyleGuide: '#float-division' @@ -3650,7 +3680,7 @@ Style/HashSyntax: StyleGuide: '#hash-literals' Enabled: true VersionAdded: '0.9' - VersionChanged: '0.43' + VersionChanged: '1.24' EnforcedStyle: ruby19 SupportedStyles: # checks for 1.9 syntax (e.g. {a: 1}) for all symbol keys @@ -3661,6 +3691,13 @@ Style/HashSyntax: - no_mixed_keys # enforces both ruby19 and no_mixed_keys styles - ruby19_no_mixed_keys + # Force hashes that have a hash value omission + EnforcedShorthandSyntax: always + SupportedShorthandSyntax: + # forces use of the 3.1 syntax (e.g. {foo:}) when the hash key and value are the same. + - always + # forces use of explicit hash literal value. + - never # Force hashes that have a symbol value to use hash rockets UseHashRocketsWithSymbolValues: false # Do not suggest { a?: 1 } over { :a? => 1 } in ruby19 style @@ -3837,6 +3874,12 @@ Style/LineEndConcatenation: VersionAdded: '0.18' VersionChanged: '0.64' +Style/MapToHash: + Description: 'Prefer `to_h` with a block over `map.to_h`.' + Enabled: pending + VersionAdded: '1.24' + Safe: false + Style/MethodCallWithArgsParentheses: Description: 'Use parentheses for method calls with arguments.' StyleGuide: '#method-invocation-parens' @@ -4205,6 +4248,8 @@ Style/NumericLiterals: VersionChanged: '0.48' MinDigits: 5 Strict: false + # You can specify allowed numbers. (e.g. port number 3000, 8080, and etc) + AllowedNumbers: [] Style/NumericPredicate: Description: >-