config/chefstyle.yml in chefstyle-0.5.0 vs config/chefstyle.yml in chefstyle-0.6.0
- old
+ new
@@ -1,5 +1,8 @@
+AllCops:
+ TargetRubyVersion: 2.3
+
#
# Bundler
#
Bundler/DuplicatedGem:
@@ -233,13 +236,13 @@
#
# Style
#
-Style/AccessModifierIndentation:
+Layout/AccessModifierIndentation:
Enabled: true
-Style/AlignHash:
+Layout/AlignHash:
Enabled: true
Style/AndOr:
Enabled: true
Style/ArrayJoin:
Enabled: true
@@ -263,27 +266,27 @@
Enabled: true
Style/DefWithParentheses:
Enabled: true
Style/EachForSimpleLoop:
Enabled: true
-Style/ElseAlignment:
+Layout/ElseAlignment:
Enabled: true
-Style/EmptyLineBetweenDefs:
+Layout/EmptyLineBetweenDefs:
Enabled: true
-Style/EmptyLines:
+Layout/EmptyLines:
Enabled: true
-Style/EmptyLinesAroundAccessModifier:
+Layout/EmptyLinesAroundAccessModifier:
Enabled: true
-Style/EmptyLinesAroundMethodBody:
+Layout/EmptyLinesAroundMethodBody:
Enabled: true
Style/EndBlock:
Enabled: true
-Style/EndOfLine:
+Layout/EndOfLine:
Enabled: true
Style/EvenOdd:
Enabled: true
-Style/ExtraSpacing:
+Layout/ExtraSpacing:
Enabled: true
Style/FlipFlop:
Enabled: true
Style/For:
Enabled: true
@@ -291,35 +294,35 @@
Enabled: true
Style/IfUnlessModifierOfIfUnless:
Enabled: true
Style/IfWithSemicolon:
Enabled: true
-Style/IndentAssignment:
+Layout/IndentAssignment:
Enabled: true
-Style/IndentationConsistency:
+Layout/IndentationConsistency:
Enabled: true
-Style/IndentationWidth:
+Layout/IndentationWidth:
Enabled: true
Style/InfiniteLoop:
Enabled: true
-Style/InitialIndentation:
+Layout/InitialIndentation:
Enabled: true
Style/LambdaCall:
Enabled: true
Style/MethodDefParentheses:
Enabled: true
-Style/MultilineBlockLayout:
+Layout/MultilineBlockLayout:
Enabled: true
Style/MultilineIfModifier:
Enabled: true
Style/MultilineIfThen:
Enabled: true
Style/MultilineMemoization:
Enabled: true
-Style/MultilineMethodDefinitionBraceLayout:
+Layout/MultilineMethodDefinitionBraceLayout:
Enabled: true
-Style/MultilineOperationIndentation:
+Layout/MultilineOperationIndentation:
Enabled: true
EnforcedStyle: indented
Style/MultilineTernaryOperator:
Enabled: true
Style/NegatedWhile:
@@ -362,60 +365,67 @@
'%w': '{}'
'%W': '{}'
'%x': '{}'
Style/PercentQLiterals:
Enabled: true
+Style/RedundantBegin:
+ Enabled: true
Style/RedundantException:
Enabled: true
Style/RedundantFreeze:
Enabled: true
-Style/RescueEnsureAlignment:
+Style/RedundantReturn:
Enabled: true
-Style/SafeNavigation:
+Style/RedundantSelf:
Enabled: true
+Layout/RescueEnsureAlignment:
+ Enabled: true
+# temporarily disabled, but we should do this
+Style/SafeNavigation:
+ Enabled: false
Style/SelfAssignment:
Enabled: true
Style/Semicolon:
AllowAsExpressionSeparator: true
Enabled: true
# we only 'raise' and do not 'fail'
Style/SignalException:
EnforcedStyle: only_raise
Enabled: true
-Style/SpaceAfterColon:
+Layout/SpaceAfterColon:
Enabled: true
-Style/SpaceAfterComma:
+Layout/SpaceAfterComma:
Enabled: true
-Style/SpaceAfterMethodName:
+Layout/SpaceAfterMethodName:
Enabled: true
-Style/SpaceAfterSemicolon:
+Layout/SpaceAfterSemicolon:
Enabled: true
-Style/SpaceAroundBlockParameters:
+Layout/SpaceAroundBlockParameters:
Enabled: true
-Style/SpaceAroundEqualsInParameterDefault:
+Layout/SpaceAroundEqualsInParameterDefault:
Enabled: true
-Style/SpaceAroundOperators:
+Layout/SpaceAroundOperators:
Enabled: true
-Style/SpaceBeforeBlockBraces:
+Layout/SpaceBeforeBlockBraces:
Enabled: true
-Style/SpaceBeforeComment:
+Layout/SpaceBeforeComment:
Enabled: true
-Style/SpaceBeforeSemicolon:
+Layout/SpaceBeforeSemicolon:
Enabled: true
-Style/SpaceAroundKeyword:
+Layout/SpaceAroundKeyword:
Enabled: true
-Style/SpaceInLambdaLiteral:
+Layout/SpaceInLambdaLiteral:
Enabled: true
-Style/SpaceInsideArrayPercentLiteral:
+Layout/SpaceInsideArrayPercentLiteral:
Enabled: true
-Style/SpaceInsideBlockBraces:
+Layout/SpaceInsideBlockBraces:
Enabled: true
-Style/SpaceInsideHashLiteralBraces:
+Layout/SpaceInsideHashLiteralBraces:
Enabled: true
-Style/SpaceInsideRangeLiteral:
+Layout/SpaceInsideRangeLiteral:
Enabled: true
-Style/SpaceInsideStringInterpolation:
+Layout/SpaceInsideStringInterpolation:
Enabled: true
Style/StabbyLambdaParentheses:
Enabled: true
# core chef community prefers double quotes over single quotes
Style/StringLiterals:
@@ -425,23 +435,23 @@
Enabled: true
Style/SymbolLiteral:
Enabled: true
Style/StringMethods:
Enabled: true
-Style/Tab:
+Layout/Tab:
Enabled: true
-Style/TrailingBlankLines:
+Layout/TrailingBlankLines:
Enabled: true
Style/TrailingCommaInArguments:
Enabled: true
# rubocop's default gets this completely backwards
Style/TrailingCommaInLiteral:
Enabled: true
EnforcedStyleForMultiline: comma
Style/TrailingUnderscoreVariable:
Enabled: true
-Style/TrailingWhitespace:
+Layout/TrailingWhitespace:
Enabled: true
Style/UnneededCapitalW:
Enabled: true
#Style/UnneededPercentQ: # would like to enable this one but its buggy as of 0.35.1
# Enabled: true
@@ -460,35 +470,39 @@
#
# Disabled Style
#
+# FIXME: we need to enable this
+Style/FrozenStringLiteralComment:
+ Enabled: false
+
# As of this commit we have 686 modules and classes without docs.
# This is a cop that we /should/ have enabled, but tactically we can't really enable.
Style/Documentation:
Enabled: false
Style/DocumentationMethod:
Enabled: false
# this makes whitespace formatting of DSL code impossible
-Style/SpaceBeforeFirstArg:
+Layout/SpaceBeforeFirstArg:
Enabled: false
# whitespace in expressions is useful to enhance readability
-Style/SpaceInsideBrackets:
+Layout/SpaceInsideBrackets:
Enabled: false
-Style/SpaceInsideParens:
+Layout/SpaceInsideParens:
Enabled: false
-Style/SpaceInsidePercentLiteralDelimiters:
+Layout/SpaceInsidePercentLiteralDelimiters:
Enabled: false
# more whitespace cops that we allow since they can enhance readability
-Style/EmptyLinesAroundBlockBody:
+Layout/EmptyLinesAroundBlockBody:
Enabled: false
-Style/EmptyLinesAroundClassBody:
+Layout/EmptyLinesAroundClassBody:
Enabled: false
-Style/EmptyLinesAroundModuleBody:
+Layout/EmptyLinesAroundModuleBody:
Enabled: false
# double negation is perfectly idiomatic ruby
Style/DoubleNegation:
Enabled: false
@@ -502,11 +516,11 @@
# we are ruby > 2.0 only so can disable the Encoding cop
Style/Encoding:
Enabled: false
# Dan is -1 on this one: https://github.com/chef/chef/pull/4526#issuecomment-179950045
-Style/IndentHash:
+Layout/IndentHash:
Enabled: false
# This is overly aggressive and autofix broke stuff, would need to exclude classes
# - https://github.com/chef/chef/pull/4541
Style/TrivialAccessors:
@@ -536,16 +550,19 @@
# I tend to find this more readable than long elsif chains
Style/EmptyCaseCondition:
Enabled: false
# This didn't quite do what we need
-Style/MultilineArrayBraceLayout:
+Layout/MultilineArrayBraceLayout:
Enabled: false
# This rule isn't smart enough to figure out accessors vs. things that set stuff on the system (e.g. set_member method in group providers)
Style/AccessorMethodName:
Enabled: false
# Perl backrefs are just fine and the alternative is a lot of typing.
Style/PerlBackrefs:
Enabled: false
+# This has an annoying auto-fix which fails to `require "english"` and then fails silently
+Style/SpecialGlobalVars:
+ Enabled: false