Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to RuboCop 1.9 #125

Merged
merged 2 commits into from
Jan 28, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions config/disable_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -391,6 +395,8 @@ Lint/StructNewOverride:
Enabled: false
Lint/SuppressedException:
Enabled: false
Lint/SymbolConversion:
Enabled: false
Lint/Syntax:
Enabled: false
Lint/ToEnumArguments:
Expand All @@ -401,6 +407,8 @@ Lint/TopLevelReturnWithArgument:
Enabled: false
Lint/TrailingCommaInAttributeDeclaration:
Enabled: false
Lint/TripleQuotes:
Enabled: false
Lint/UnderscorePrefixedVariableName:
Enabled: false
Lint/UnexpectedBlockArity:
Expand Down Expand Up @@ -643,6 +651,8 @@ Style/IfUnlessModifier:
Enabled: false
Style/IfUnlessModifierOfIfUnless:
Enabled: false
Style/IfWithBooleanLiteralBranches:
Enabled: false
Style/IfWithSemicolon:
Enabled: false
Style/ImplicitRuntimeError:
Expand Down
38 changes: 34 additions & 4 deletions config/upstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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.'
Expand Down Expand Up @@ -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: >-
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -3339,6 +3363,7 @@ Style/FormatStringToken:
MaxUnannotatedPlaceholdersAllowed: 1
VersionAdded: '0.49'
VersionChanged: '1.0'
IgnoredMethods: []

Style/FrozenStringLiteralComment:
Description: >-
Expand Down Expand Up @@ -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'
Expand Down
4 changes: 2 additions & 2 deletions 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 = "1.6.0"
RUBOCOP_VERSION = "1.8.1"
end
RUBOCOP_VERSION = "1.9.0"
end