config/chefstyle.yml in chefstyle-2.2.2 vs config/chefstyle.yml in chefstyle-2.2.3
- old
+ new
@@ -1,7 +1,9 @@
AllCops:
TargetRubyVersion: 2.5
+ NewCops: disable
+ DisabledByDefault: true
SuggestExtensions: false
#
# Bundler
#
@@ -41,12 +43,12 @@
Enabled: true
Lint/DuplicateCaseCondition:
Enabled: true
Lint/DuplicateMethods:
Enabled: true
-Lint/DuplicatedKey:
- Enabled: true
+# Lint/DuplicatedKey: TODO broken with rubocop 1.25.1 move
+# Enabled: true
Lint/EachWithObjectArgument:
Enabled: true
Lint/ElseLayout:
Enabled: true
Lint/EmptyEnsure:
@@ -58,12 +60,12 @@
Lint/EmptyWhen:
Enabled: true
Layout/EndAlignment:
Enabled: true
AutoCorrect: true
-Lint/EndInMethod:
- Enabled: true
+# Lint/EndInMethod: TODO broken with rubocop 1.25.1 move
+# Enabled: true
Lint/EnsureReturn:
Enabled: true
Lint/FloatOutOfRange:
Enabled: true
Lint/FormatParameterMismatch:
@@ -78,12 +80,12 @@
Enabled: true
Lint/LiteralInInterpolation:
Enabled: true
Lint/Loop:
Enabled: true
-Lint/MultipleCompare:
- Enabled: true
+# Lint/MultipleCompare: TODO broken with rubocop 1.25.1 move
+# Enabled: true
Lint/NestedMethodDefinition:
Enabled: true
Lint/NextWithoutAccumulator:
Enabled: true
Lint/NonLocalExitFromIterator:
@@ -102,28 +104,28 @@
Enabled: true
Lint/ShadowedException:
Enabled: true
Lint/ShadowingOuterLocalVariable:
Enabled: true
-Lint/StringConversionInInterpolation:
- Enabled: true
+# Lint/StringConversionInInterpolation: TODO broken with rubocop 1.25.1 move
+# Enabled: true
Lint/UnderscorePrefixedVariableName:
Enabled: true
Lint/UnifiedInteger:
Enabled: true
-Lint/UnneededSplatExpansion:
- Enabled: true
+# Lint/UnneededSplatExpansion: TODO broken with rubocop 1.25.1 move
+# Enabled: true
Lint/UnreachableCode:
Enabled: true
Lint/UriEscapeUnescape:
Enabled: true
Lint/UselessAccessModifier:
Enabled: true
Lint/UselessAssignment:
Enabled: true
-Lint/UselessComparison:
- Enabled: true
+# Lint/UselessComparison: TODO broken with rubocop 1.25.1 move
+# Enabled: true
Lint/UselessElseWithoutRescue:
Enabled: true
Lint/UselessSetterCall:
Enabled: true
Lint/Void:
@@ -140,18 +142,18 @@
Enabled: false
Lint/UnusedMethodArgument:
Enabled: false
# We ignore Exceptions a lot
-Lint/HandleExceptions:
+Lint/SuppressedException:
Enabled: false
# We also decorate Exceptions a lot
Lint/RescueException:
Enabled: false
# disabling this will make it easier to stage chefstyle rollouts
-Lint/UnneededCopDisableDirective:
+Lint/RedundantCopDisableDirective:
Enabled: false
#
# Security
#
@@ -191,21 +193,21 @@
# Style/Naming/Layout
#
Layout/AccessModifierIndentation:
Enabled: true
-Layout/AlignArguments:
- Enabled: true
- EnforcedStyle: with_fixed_indentation
-Layout/AlignParameters:
- Enabled: true
- EnforcedStyle: with_fixed_indentation
+# Layout/AlignArguments: TODO broken with rubocop 1.25.1 move
+# Enabled: true
+# EnforcedStyle: with_fixed_indentation
+# Layout/AlignParameters: TODO broken with rubocop 1.25.1 move
+# Enabled: true
+# EnforcedStyle: with_fixed_indentation
# the "ignore_implict" is here for keyword args in method calls which are
# "implicit" hashes, and those should not be treated like normal hashes
-Layout/AlignHash:
- Enabled: true
- EnforcedLastArgumentHashStyle: ignore_implicit
+# Layout/AlignHash: TODO broken with rubocop 1.25.1 move
+# Enabled: true
+# EnforcedLastArgumentHashStyle: ignore_implicit
Style/AndOr:
Enabled: true
Style/ArrayJoin:
Enabled: true
Naming/AsciiIdentifiers:
@@ -278,17 +280,17 @@
Enabled: true
Style/IfUnlessModifierOfIfUnless:
Enabled: true
Style/IfWithSemicolon:
Enabled: true
-Layout/IndentAssignment:
- Enabled: true
-Layout/IndentFirstArgument:
- EnforcedStyle: consistent
- Enabled: true
-Layout/IndentHeredoc:
- Enabled: true
+# Layout/IndentAssignment: TODO broken with rubocop 1.25.1 move
+# Enabled: true
+# Layout/IndentFirstArgument: TODO broken with rubocop 1.25.1 move
+# EnforcedStyle: consistent
+# Enabled: true
+# Layout/IndentHeredoc: TODO broken with rubocop 1.25.1 move
+# Enabled: true
Layout/IndentationConsistency:
Enabled: true
Layout/IndentationWidth:
Enabled: true
Style/InfiniteLoop:
@@ -452,12 +454,12 @@
Enabled: true
Style/SymbolProc:
Enabled: true
Layout/IndentationStyle:
Enabled: true
-Layout/TrailingBlankLines:
- Enabled: true
+# Layout/TrailingBlankLines: TODO broken with rubocop 1.25.1 move
+# Enabled: true
Style/TrailingCommaInArguments:
Enabled: true
# rubocop's default gets this completely backwards
Style/TrailingCommaInArrayLiteral:
Enabled: true
@@ -467,13 +469,13 @@
EnforcedStyleForMultiline: comma
Style/TrailingUnderscoreVariable:
Enabled: true
Layout/TrailingWhitespace:
Enabled: true
-Style/UnneededCapitalW:
- Enabled: true
-Style/UnneededInterpolation:
+# Style/UnneededCapitalW: TODO broken with rubocop 1.25.1 move
+# Enabled: true
+Style/RedundantInterpolation:
Enabled: false # buggy: https://github.com/rubocop-hq/rubocop/issues/6099
#Style/UnneededPercentQ: # would like to enable this one but its buggy as of 0.35.1
# Enabled: true
Naming/VariableName:
Enabled: true
@@ -538,11 +540,11 @@
# single line if/unless blocks may read more naturally than modifiers
Style/IfUnlessModifier:
Enabled: false
# Dan is -1 on this one: https://github.com/chef/chef/pull/4526#issuecomment-179950045
-Layout/IndentFirstHashElement:
+Layout/FirstHashElementIndentation:
Enabled: false
# This is overly aggressive and autofix broke stuff, would need to exclude classes
# - https://github.com/chef/chef/pull/4541
Style/TrivialAccessors:
@@ -608,18 +610,14 @@
# is also perfectly descriptive even though its only 2 characters...).
Naming/HeredocDelimiterNaming:
Enabled: false
Naming/PredicateName:
Enabled: false
-Naming/UncommunicativeMethodParamName:
+Naming/MethodParameterName:
Enabled: false
Naming/MemoizedInstanceVariableName:
Enabled: false
Naming/VariableNumber:
- Enabled: false
-
-# This breaks all kinds of specs in chef (i don't think it will ever quite work correctly)
-Style/BracesAroundHashParameters:
Enabled: false
# We almost never use format strings but this cop triggers on any string with "%{whatever}" in it and is 99% false positives
Style/FormatStringToken:
Enabled: false