config/default.yml in rubocop-1.0.0 vs config/default.yml in rubocop-1.1.0

- old
+ new

@@ -1332,11 +1332,11 @@ Layout/TrailingWhitespace: Description: 'Avoid trailing whitespace.' StyleGuide: '#no-trailing-whitespace' Enabled: true VersionAdded: '0.49' - VersionChanged: '0.83' + VersionChanged: '1.0' AllowInHeredoc: false #################### Lint ################################## ### Warnings @@ -1452,10 +1452,15 @@ Lint/DuplicateMethods: Description: 'Check for duplicate method definitions.' Enabled: true VersionAdded: '0.29' +Lint/DuplicateRegexpCharacterClassElement: + Description: 'Checks for duplicate elements in Regexp character classes.' + Enabled: pending + VersionAdded: '1.1' + Lint/DuplicateRequire: Description: 'Check for duplicate `require`s and `require_relative`s.' Enabled: true VersionAdded: '0.90' @@ -1472,10 +1477,16 @@ Lint/ElseLayout: Description: 'Check for odd code arrangement in an else block.' Enabled: true VersionAdded: '0.17' +Lint/EmptyBlock: + Description: 'This cop checks for blocks without a body.' + Enabled: pending + VersionAdded: '1.1' + AllowComments: true + Lint/EmptyConditionalBody: Description: 'This cop checks for the presence of `if`, `elsif` and `unless` branches without a body.' Enabled: true AllowComments: true VersionAdded: '0.89' @@ -1645,11 +1656,12 @@ Lint/MultipleComparison: Description: "Use `&&` operator to compare multiple values." Enabled: true VersionAdded: '0.47' - VersionChanged: '0.77' + VersionChanged: '1.1' + AllowMethodComparison: true Lint/NestedMethodDefinition: Description: 'Do not use nested method definitions.' StyleGuide: '#no-nested-methods' Enabled: true @@ -1680,12 +1692,16 @@ Lint/NumberConversion: Description: 'Checks unsafe usage of number conversion methods.' Enabled: false VersionAdded: '0.53' - VersionChanged: '0.70' + VersionChanged: '1.1' SafeAutoCorrect: false + IgnoredMethods: [] + IgnoredClasses: + - Time + - DateTime Lint/OrderedMagicComments: Description: 'Checks the proper ordering of magic comments and whether a magic comment is not placed before a shebang.' Enabled: true VersionAdded: '0.53' @@ -1908,10 +1924,15 @@ Description: 'Checks syntax error.' 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 + VersionAdded: '1.1' + Lint/ToJSON: Description: 'Ensure #to_json includes an optional argument.' Enabled: true VersionAdded: '0.66' @@ -1934,10 +1955,15 @@ Lint/UnifiedInteger: Description: 'Use Integer instead of Fixnum or Bignum.' Enabled: true VersionAdded: '0.43' +Lint/UnmodifiedReduceAccumulator: + Description: Checks for `reduce` or `inject` blocks that do not update the accumulator each iteration. + Enabled: pending + VersionAdded: '1.1' + Lint/UnreachableCode: Description: 'Unreachable code.' Enabled: true VersionAdded: '0.9' @@ -2476,10 +2502,17 @@ EnforcedStyle: conditionals SupportedStyles: - always - conditionals +Style/ArgumentsForwarding: + Description: 'Use arguments forwarding.' + StyleGuide: '#arguments-forwarding' + Enabled: pending + AllowOnlyRestArgument: true + VersionAdded: '1.1' + Style/ArrayCoercion: Description: >- Use Array() instead of explicit Array check or [*var], when dealing with a variable you want to treat as an Array, but you're not certain it's an array. StyleGuide: '#array-coercion' @@ -2916,10 +2949,18 @@ Description: >- Forbids disabling/enabling cops within source code. Enabled: false VersionAdded: '0.82' +Style/DocumentDynamicEvalDefinition: + Description: >- + When using `class_eval` (or other `eval`) with string interpolation, + add a comment block showing its appearance if interpolated. + StyleGuide: '#eval-comment-docs' + Enabled: pending + VersionAdded: '1.1' + Style/Documentation: Description: 'Document classes and non-namespace modules.' Enabled: true VersionAdded: '0.9' Exclude: @@ -3533,10 +3574,11 @@ Description: >- Avoid comparing a variable with multiple items in a conditional, use Array#include? instead. Enabled: true VersionAdded: '0.49' + VersionChanged: '1.1' Style/MutableConstant: Description: 'Do not assign mutable objects to constants.' Enabled: true VersionAdded: '0.34' @@ -4223,9 +4265,16 @@ Description: 'Checks for inheritance from Struct.new.' StyleGuide: '#no-extend-struct-new' Enabled: true VersionAdded: '0.29' VersionChanged: '0.86' + +Style/SwapValues: + Description: 'This cop enforces the use of shorthand-style swapping of 2 variables.' + StyleGuide: '#values-swapping' + Enabled: pending + VersionAdded: '1.1' + SafeAutoCorrect: false Style/SymbolArray: Description: 'Use %i or %I for arrays of symbols.' StyleGuide: '#percent-i' Enabled: true