Skip to content

Commit

Permalink
Merge pull request #153 from chef/1.24.1
Browse files Browse the repository at this point in the history
Update RuboCop engine to 1.24.1
  • Loading branch information
tas50 authored Jan 1, 2022
2 parents 8b945f7 + c72bbc6 commit 00157c6
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 2 deletions.
8 changes: 8 additions & 0 deletions config/disable_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -491,6 +491,8 @@ Naming/AccessorMethodName:
Enabled: false
Naming/AsciiIdentifiers:
Enabled: false
Naming/BlockForwarding:
Enabled: false
Naming/BlockParameterName:
Enabled: false
Naming/ClassAndModuleCamelCase:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -705,6 +711,8 @@ Style/LambdaCall:
Enabled: false
Style/LineEndConcatenation:
Enabled: false
Style/MapToHash:
Enabled: false
Style/MethodCallWithoutArgsParentheses:
Enabled: false
Style/MethodCallWithArgsParentheses:
Expand Down
47 changes: 46 additions & 1 deletion config/upstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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: >-
Expand Down Expand Up @@ -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: >-
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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: >-
Expand Down
2 changes: 1 addition & 1 deletion lib/chefstyle/version.rb
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 00157c6

Please sign in to comment.