config/chefstyle.yml in chefstyle-0.4.0 vs config/chefstyle.yml in chefstyle-0.5.0
- old
+ new
@@ -1,6 +1,13 @@
#
+# Bundler
+#
+
+Bundler/DuplicatedGem:
+ Enabled: true
+
+#
# Lint
#
Lint/AmbiguousOperator:
Enabled: true
@@ -12,20 +19,24 @@
Enabled: true
Lint/Debugger:
Enabled: true
Lint/DefEndAlignment:
Enabled: true
+Lint/DuplicateCaseCondition:
+ Enabled: true
Lint/DuplicateMethods:
Enabled: true
Lint/DuplicatedKey:
Enabled: true
Lint/EachWithObjectArgument:
Enabled: true
Lint/ElseLayout:
Enabled: true
Lint/EmptyEnsure:
Enabled: true
+Lint/EmptyExpression:
+ Enabled: true
Lint/EmptyInterpolation:
Enabled: true
Lint/EndAlignment:
Enabled: true
Lint/EndInMethod:
@@ -36,32 +47,44 @@
Enabled: true
Lint/FormatParameterMismatch:
Enabled: true
Lint/ImplicitStringConcatenation:
Enabled: true
+Lint/InheritException:
+ Enabled: true
Lint/InvalidCharacterLiteral:
Enabled: true
Lint/LiteralInCondition:
Enabled: true
Lint/LiteralInInterpolation:
Enabled: true
Lint/Loop:
Enabled: true
+Lint/MultipleCompare:
+ Enabled: true
Lint/NestedMethodDefinition:
Enabled: true
Lint/NextWithoutAccumulator:
Enabled: true
Lint/NonLocalExitFromIterator:
Enabled: true
+Lint/PercentSymbolArray:
+ Eanbled: true
Lint/RandOne:
Enabled: true
Lint/RequireParentheses:
Enabled: true
+Lint/SafeNavigationChain:
+ Enabled: true
Lint/StringConversionInInterpolation:
Enabled: true
Lint/UnderscorePrefixedVariableName:
Enabled: true
+Lint/UnifiedInteger:
+ Enabled: true
+Lint/UnneededDisable:
+ Enabled: true
Lint/UnreachableCode:
Enabled: true
Lint/UselessAccessModifier:
Enabled: true
Lint/UselessComparison:
@@ -89,11 +112,11 @@
# We also decorate Exceptions a lot
Lint/RescueException:
Enabled: false
# we have lots of not-insecure uses of eval
-Lint/Eval:
+Security/Eval:
Enabled: false
# disabling this will make it easier to stage chefstyle rollouts
Lint/UnneededDisable:
Enabled: false
@@ -104,10 +127,12 @@
Performance/Casecmp:
Enabled: true
Performance/CaseWhenSplat:
Enabled: true
+Performance/CompareWithBlock:
+ Enabled: true
Performance/Count:
Enabled: true
Performance/Detect:
Enabled: true
Performance/DoubleStartEndWith:
@@ -130,16 +155,20 @@
Enabled: true
Performance/RedundantMerge:
Enabled: true
Performance/RedundantSortBy:
Enabled: true
+Performance/RegexpMatch:
+ Enabled: true
Performance/ReverseEach:
Enabled: true
Performance/Sample:
Enabled: true
Performance/Size:
Enabled: true
+Performance/SortWithBlock:
+ Enabled: true
Performance/StartWith:
Enabled: true
Performance/StringReplacement:
Enabled: true
Performance/TimesMap:
@@ -182,10 +211,12 @@
# work to do and we have much higher priorities.
Metrics/AbcSize:
Enabled: false
Metrics/BlockNesting:
Enabled: false
+Metrics/BlockLength:
+ Enabled: false
Metrics/ClassLength:
Enabled: false
Metrics/CyclomaticComplexity:
Enabled: false
Metrics/LineLength:
@@ -228,10 +259,14 @@
Enabled: true
Style/CommandLiteral:
Enabled: true
Style/ConstantName:
Enabled: true
+Style/DefWithParentheses:
+ Enabled: true
+Style/EachForSimpleLoop:
+ Enabled: true
Style/ElseAlignment:
Enabled: true
Style/EmptyLineBetweenDefs:
Enabled: true
Style/EmptyLines:
@@ -272,12 +307,16 @@
Enabled: true
Style/MethodDefParentheses:
Enabled: true
Style/MultilineBlockLayout:
Enabled: true
+Style/MultilineIfModifier:
+ Enabled: true
Style/MultilineIfThen:
Enabled: true
+Style/MultilineMemoization:
+ Enabled: true
Style/MultilineMethodDefinitionBraceLayout:
Enabled: true
Style/MultilineOperationIndentation:
Enabled: true
EnforcedStyle: indented
@@ -287,10 +326,18 @@
Enabled: true
Style/NestedModifier:
Enabled: true
Style/NestedTernaryOperator:
Enabled: true
+Style/NilComparison:
+ Enabled: true
+Style/NonNilCheck:
+ Enabled: true
+# `foo.zero?` is slower and substantially more annoying to read than `foo == 0`
+Style/NumericPredicate:
+ Enabled: true
+ EnforcedStyle: comparison
Style/OneLineConditional:
Enabled: true
Style/OpMethod:
Enabled: true
Style/OptionalArguments:
@@ -305,10 +352,11 @@
Style/PercentLiteralDelimiters:
Enabled: true
PreferredDelimiters:
'%': '{}'
'%i': '{}'
+ '%I': '{}'
'%q': '{}'
'%Q': '{}'
'%r': '{}'
'%s': '{}'
'%w': '{}'
@@ -320,10 +368,17 @@
Enabled: true
Style/RedundantFreeze:
Enabled: true
Style/RescueEnsureAlignment:
Enabled: true
+Style/SafeNavigation:
+ Enabled: true
+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:
@@ -342,22 +397,26 @@
Enabled: true
Style/SpaceBeforeBlockBraces:
Enabled: true
Style/SpaceBeforeComment:
Enabled: true
-Style/SpaceBeforeFirstArg:
- Enabled: true
Style/SpaceBeforeSemicolon:
Enabled: true
Style/SpaceAroundKeyword:
Enabled: true
+Style/SpaceInLambdaLiteral:
+ Enabled: true
+Style/SpaceInsideArrayPercentLiteral:
+ Enabled: true
Style/SpaceInsideBlockBraces:
Enabled: true
Style/SpaceInsideHashLiteralBraces:
Enabled: true
Style/SpaceInsideRangeLiteral:
Enabled: true
+Style/SpaceInsideStringInterpolation:
+ Enabled: true
Style/StabbyLambdaParentheses:
Enabled: true
# core chef community prefers double quotes over single quotes
Style/StringLiterals:
EnforcedStyle: double_quotes
@@ -386,10 +445,12 @@
Enabled: true
#Style/UnneededPercentQ: # would like to enable this one but its buggy as of 0.35.1
# Enabled: true
Style/VariableName:
Enabled: true
+Style/VariableInterpolation:
+ Enabled: true
Style/WhenThen:
Enabled: true
Style/WhileUntilDo:
Enabled: true
Style/WhileUntilModifier:
@@ -403,20 +464,24 @@
# 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:
Enabled: false
# whitespace in expressions is useful to enhance readability
Style/SpaceInsideBrackets:
Enabled: false
Style/SpaceInsideParens:
Enabled: false
+Style/SpaceInsidePercentLiteralDelimiters:
+ Enabled: false
# more whitespace cops that we allow since they can enhance readability
Style/EmptyLinesAroundBlockBody:
Enabled: false
Style/EmptyLinesAroundClassBody:
@@ -460,5 +525,27 @@
Enabled: false
# Parens around ternaries often make them more readable and reduces cognitive load over operator precidence
Style/TernaryParentheses:
Enabled: false
+
+# Underscores in numbers are super ugly for port numbers, freebsd versions, etc.
+# If we could mandate that this gets turned on only for numbers >= 1e9 which require three _'s then maybe.
+Style/NumericLiterals:
+ Enabled: false
+
+# 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:
+ 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
+