config/upstream.yml in cookstyle-7.4.0 vs config/upstream.yml in cookstyle-7.5.1

- old
+ new

@@ -471,11 +471,11 @@ Layout/EmptyLineBetweenDefs: Description: 'Use empty lines between class/module/method defs.' StyleGuide: '#empty-lines-between-methods' Enabled: true VersionAdded: '0.49' - VersionChanged: '1.4' + VersionChanged: '1.7' EmptyLineBetweenMethodDefs: true EmptyLineBetweenClassDefs: true EmptyLineBetweenModuleDefs: true # If `true`, this parameter means that single line method definitions don't # need an empty line between them. @@ -1190,10 +1190,17 @@ SupportedStylesForEmptyBraces: - space - no_space VersionChanged: '0.52' +Layout/SpaceBeforeBrackets: + Description: 'Checks for receiver with a space before the opening brackets.' + StyleGuide: '#space-in-brackets-access' + Enabled: pending + VersionAdded: '1.7' + Safe: false + Layout/SpaceBeforeComma: Description: 'No spaces before commas.' Enabled: true VersionAdded: '0.49' @@ -1352,10 +1359,15 @@ AllowInHeredoc: false #################### Lint ################################## ### Warnings +Lint/AmbiguousAssignment: + Description: 'Checks for mistyped shorthand assignments.' + Enabled: pending + VersionAdded: '1.7' + Lint/AmbiguousBlockAssociation: Description: >- Checks for ambiguous block association with method when param passed without parentheses. StyleGuide: '#syntax' @@ -1394,10 +1406,11 @@ Lint/BinaryOperatorWithIdenticalOperands: Description: 'This cop checks for places where binary operator has identical operands.' Enabled: true Safe: false VersionAdded: '0.89' + VersionChanged: '1.7' Lint/BooleanSymbol: Description: 'Check for `:true` and `:false` symbols.' Enabled: true Safe: false @@ -1470,10 +1483,13 @@ Lint/DuplicateBranch: Description: Checks that there are no repeated bodies within `if/unless`, `case-when` and `rescue` constructs. Enabled: pending VersionAdded: '1.3' + VersionChanged: '1.7' + IgnoreLiteralBranches: false + IgnoreConstantBranches: false Lint/DuplicateCaseCondition: Description: 'Do not repeat values in case conditionals.' Enabled: true VersionAdded: '0.45' @@ -1840,10 +1856,12 @@ Lint/RedundantSplatExpansion: Description: 'Checks for splat unnecessarily being called on literals.' Enabled: true VersionAdded: '0.76' + VersionChanged: '1.7' + AllowPercentLiteralArrayArgument: true Lint/RedundantStringCoercion: Description: 'Checks for Object#to_s usage in string interpolation.' StyleGuide: '#no-to-s' Enabled: true @@ -2043,10 +2061,15 @@ Lint/UnreachableLoop: Description: 'This cop checks for loops that will have at most one iteration.' Enabled: true VersionAdded: '0.89' + VersionChanged: '1.7' + IgnoredPatterns: + # RSpec uses `times` in its message expectations + # eg. `exactly(2).times` + - !ruby/regexp /(exactly|at_least|at_most)\(\d+\)\.times/ Lint/UnusedBlockArgument: Description: 'Checks for unused block arguments.' StyleGuide: '#underscore-unused-vars' Enabled: true @@ -2893,11 +2916,11 @@ Style/CollectionMethods: Description: 'Preferred collection methods.' StyleGuide: '#map-find-select-reduce-include-size' Enabled: false VersionAdded: '0.9' - VersionChanged: '0.27' + VersionChanged: '1.7' Safe: false # Mapping from undesired method to desired method # e.g. to use `detect` over `find`: # # Style/CollectionMethods: @@ -2908,10 +2931,15 @@ collect!: 'map!' inject: 'reduce' detect: 'find' find_all: 'select' member?: 'include?' + # Methods in this array accept a final symbol as an implicit block + # eg. `inject(:+)` + MethodsAcceptingSymbol: + - inject + - reduce Style/ColonMethodCall: Description: 'Do not use :: for method call.' StyleGuide: '#double-colons' Enabled: true @@ -2967,10 +2995,11 @@ Style/CommentedKeyword: Description: 'Do not place comments on the same line as certain keywords.' Enabled: true VersionAdded: '0.51' + VersionChanged: '1.7' Style/ConditionalAssignment: Description: >- Use the return value of `if` and `case` statements for assignment to a variable and variable comparison instead @@ -3326,10 +3355,17 @@ StyleGuide: '#hash-each' Enabled: true VersionAdded: '0.80' Safe: false +Style/HashExcept: + Description: >- + Checks for usages of `Hash#reject`, `Hash#select`, and `Hash#filter` methods + that can be replaced with `Hash#except` method. + Enabled: pending + VersionAdded: '1.7' + Style/HashLikeCase: Description: >- Checks for places where `case-when` represents a simple 1:1 mapping and can be replaced with a hash lookup. Enabled: true @@ -3480,10 +3516,11 @@ Style/KeywordParametersOrder: Description: 'Enforces that optional keyword parameters are placed at the end of the parameters list.' StyleGuide: '#keyword-parameters-order' Enabled: true VersionAdded: '0.90' + VersionChanged: '1.7' Style/Lambda: Description: 'Use the new lambda literal syntax for single-line blocks.' StyleGuide: '#lambda-multi-line' Enabled: true @@ -3518,11 +3555,11 @@ Style/MethodCallWithArgsParentheses: Description: 'Use parentheses for method calls with arguments.' StyleGuide: '#method-invocation-parens' Enabled: false VersionAdded: '0.47' - VersionChanged: '0.61' + VersionChanged: '1.7' IgnoreMacros: true IgnoredMethods: [] IgnoredPatterns: [] IncludedMacros: [] AllowParenthesesInMultilineCall: false @@ -3552,11 +3589,11 @@ Checks if the method definitions have or don't have parentheses. StyleGuide: '#method-parens' Enabled: true VersionAdded: '0.16' - VersionChanged: '0.35' + VersionChanged: '1.7' EnforcedStyle: require_parentheses SupportedStyles: - require_parentheses - require_no_parentheses - require_no_parentheses_except_multiline @@ -3658,10 +3695,11 @@ Style/MultilineMethodSignature: Description: 'Avoid multi-line method signatures.' Enabled: false VersionAdded: '0.59' + VersionChanged: '1.7' Style/MultilineTernaryOperator: Description: >- Avoid multi-line ?: (the ternary operator); use if/unless instead. @@ -4024,16 +4062,20 @@ Style/RedundantArgument: Description: 'Check for a redundant argument passed to certain methods.' Enabled: pending Safe: false VersionAdded: '1.4' - VersionChanged: '1.6' + VersionChanged: '1.7' Methods: # Array#join join: '' # String#split split: ' ' + # String#chomp + chomp: "\n" + # String#chomp! + chomp!: "\n" Style/RedundantAssignment: Description: 'Checks for redundant assignment before returning.' Enabled: true VersionAdded: '0.87' @@ -4286,10 +4328,10 @@ Style/SingleLineMethods: Description: 'Avoid single-line methods.' StyleGuide: '#no-single-line-methods' Enabled: true VersionAdded: '0.9' - VersionChanged: '0.19' + VersionChanged: '1.7' AllowIfMethodIsEmpty: true Style/SlicingWithRange: Description: 'Checks array slicing is done with endless ranges when suitable.' Enabled: true