config/upstream.yml in cookstyle-6.15.9 vs config/upstream.yml in cookstyle-6.16.4

- old
+ new

@@ -397,11 +397,10 @@ # keyword on the same line. EnforcedStyleAlignWith: start_of_line SupportedStylesAlignWith: - start_of_line - def - AutoCorrect: false Severity: warning Layout/DotPosition: Description: 'Checks the position of the dot in multi-line method calls.' StyleGuide: '#consistent-multi-line-chains' @@ -434,10 +433,18 @@ Description: 'Add an empty line after magic comments to separate them from code.' StyleGuide: '#separate-magic-comments-from-code' Enabled: true VersionAdded: '0.49' +Layout/EmptyLineAfterMultilineCondition: + Description: 'Enforces empty line after multiline condition.' + # This is disabled, because this style is not very common in practice. + Enabled: false + VersionAdded: '0.90' + Reference: + - https://github.com/airbnb/ruby#multiline-if-newline + Layout/EmptyLineBetweenDefs: Description: 'Use empty lines between defs.' StyleGuide: '#empty-lines-between-methods' Enabled: true VersionAdded: '0.49' @@ -553,11 +560,10 @@ EnforcedStyleAlignWith: keyword SupportedStylesAlignWith: - keyword - variable - start_of_line - AutoCorrect: false Severity: warning Layout/EndOfLine: Description: 'Use Unix-style line endings.' StyleGuide: '#crlf' @@ -1425,10 +1431,15 @@ Lint/DuplicateMethods: Description: 'Check for duplicate method definitions.' Enabled: true VersionAdded: '0.29' +Lint/DuplicateRequire: + Description: 'Check for duplicate `require`s and `require_relative`s.' + Enabled: pending + VersionAdded: '0.90' + Lint/DuplicateRescueException: Description: 'Checks that there are no repeated exceptions used in `rescue` expressions.' Enabled: pending VersionAdded: '0.89' @@ -1451,17 +1462,22 @@ Lint/EmptyEnsure: Description: 'Checks for empty ensure block.' Enabled: true VersionAdded: '0.10' VersionChanged: '0.48' - AutoCorrect: false Lint/EmptyExpression: Description: 'Checks for empty expressions.' Enabled: true VersionAdded: '0.45' +Lint/EmptyFile: + Description: 'Enforces that Ruby source files are not empty.' + Enabled: pending + AllowComments: true + VersionAdded: '0.90' + Lint/EmptyInterpolation: Description: 'Checks for empty string interpolation.' Enabled: true VersionAdded: '0.20' VersionChanged: '0.45' @@ -1854,10 +1870,15 @@ Lint/TopLevelReturnWithArgument: Description: 'This cop detects top level return statements with argument.' Enabled: 'pending' VersionAdded: '0.89' +Lint/TrailingCommaInAttributeDeclaration: + Description: 'This cop checks for trailing commas in attribute declarations.' + Enabled: pending + VersionAdded: '0.90' + Lint/UnderscorePrefixedVariableName: Description: 'Do not use prefix `_` for a variable that is used.' Enabled: true VersionAdded: '0.21' AllowKeywordBlockArguments: false @@ -1929,10 +1950,17 @@ Lint/UselessElseWithoutRescue: Description: 'Checks for useless `else` in `begin..end` without `rescue`.' Enabled: true VersionAdded: '0.17' +Lint/UselessMethodDefinition: + Description: 'Checks for useless method definitions.' + Enabled: pending + VersionAdded: '0.90' + Safe: false + AllowComments: true + Lint/UselessSetterCall: Description: 'Checks for useless setter call to a local variable.' Enabled: true VersionAdded: '0.13' VersionChanged: '0.80' @@ -2589,10 +2617,11 @@ Style/CaseLikeIf: Description: 'This cop identifies places where `if-elsif` constructions can be replaced with `case-when`.' StyleGuide: '#case-vs-if-else' Enabled: 'pending' + Safe: false VersionAdded: '0.88' Style/CharacterLiteral: Description: 'Checks for uses of character literals.' StyleGuide: '#no-character-literals' @@ -2606,11 +2635,10 @@ # outer parent is a module or a class. Moving from nested to compact requires # verification that the outer parent is defined elsewhere. Rubocop does not # have the knowledge to perform either operation safely and thus requires # manual oversight. SafeAutoCorrect: false - AutoCorrect: false Enabled: true VersionAdded: '0.19' # # Basically there are two different styles: # @@ -2645,10 +2673,20 @@ StyleGuide: '#def-self-class-methods' Enabled: true VersionAdded: '0.9' VersionChanged: '0.20' +Style/ClassMethodsDefinitions: + Description: 'Enforces using `def self.method_name` or `class << self` to define class methods.' + StyleGuide: '#def-self-class-methods' + Enabled: false + VersionAdded: '0.89' + EnforcedStyle: def_self + SupportedStyles: + - def_self + - self_class + Style/ClassVars: Description: 'Avoid the use of class variables.' StyleGuide: '#no-class-vars' Enabled: true VersionAdded: '0.13' @@ -2685,10 +2723,18 @@ Description: 'Do not use :: for defining class methods.' StyleGuide: '#colon-method-definition' Enabled: true VersionAdded: '0.52' +Style/CombinableLoops: + Description: >- + Checks for places where multiple consecutive loops over the same data + can be combined into a single loop. + Enabled: pending + Safe: false + VersionAdded: '0.90' + Style/CommandLiteral: Description: 'Use `` or %x around command literals.' StyleGuide: '#percent-x' Enabled: true VersionAdded: '0.30' @@ -3019,11 +3065,11 @@ # comments (e.g. `# frozen_string_literal: false`) to be enabled. - always_true # `never` will enforce that the frozen string literal comment does not # exist in a file. - never - Safe: false + SafeAutoCorrect: false Style/GlobalStdStream: Description: 'Enforces the use of `$stdout/$stderr/$stdin` instead of `STDOUT/STDERR/STDIN`.' StyleGuide: '#global-stdout' Enabled: pending @@ -3099,19 +3145,21 @@ UseHashRocketsWithSymbolValues: false # Do not suggest { a?: 1 } over { :a? => 1 } in ruby19 style PreferHashRocketsForNonAlnumEndingSymbols: false Style/HashTransformKeys: - Description: 'Prefer `transform_keys` over `each_with_object` and `map`.' + Description: 'Prefer `transform_keys` over `each_with_object`, `map`, or `to_h`.' Enabled: 'pending' VersionAdded: '0.80' + VersionChanged: '0.90' Safe: false Style/HashTransformValues: - Description: 'Prefer `transform_values` over `each_with_object` and `map`.' + Description: 'Prefer `transform_values` over `each_with_object`, `map`, or `to_h`.' Enabled: 'pending' VersionAdded: '0.80' + VersionChanged: '0.90' Safe: false Style/IdenticalConditionalBranches: Description: >- Checks that conditional statements do not have an identical @@ -3204,10 +3252,16 @@ # Allow addresses to be permitted AllowedAddresses: - "::" # :: is a valid IPv6 address, but could potentially be legitimately in code +Style/KeywordParametersOrder: + Description: 'Enforces that optional keyword parameters are placed at the end of the parameters list.' + StyleGuide: '#keyword-parameters-order' + Enabled: pending + VersionAdded: '0.90' + Style/Lambda: Description: 'Use the new lambda literal syntax for single-line blocks.' StyleGuide: '#lambda-multi-line' Enabled: true VersionAdded: '0.9' @@ -3577,11 +3631,10 @@ Safe: false # This will change to a new method call which isn't guaranteed to be on the # object. Switching these methods has to be done with knowledge of the types # of the variables which rubocop doesn't have. SafeAutoCorrect: false - AutoCorrect: false Enabled: true VersionAdded: '0.42' VersionChanged: '0.59' EnforcedStyle: predicate SupportedStyles: @@ -3593,16 +3646,17 @@ Exclude: - 'spec/**/*' Style/OneLineConditional: Description: >- - Favor the ternary operator(?:) over - if/then/else/end constructs. + Favor the ternary operator (?:) or multi-line constructs over + single-line if/then/else/end constructs. StyleGuide: '#ternary-operator' Enabled: true + AlwaysCorrectToMultiline: false VersionAdded: '0.9' - VersionChanged: '0.38' + VersionChanged: '0.90' Style/OptionHash: Description: "Don't use option hashes when you can use keyword arguments." Enabled: false VersionAdded: '0.33' @@ -3829,10 +3883,16 @@ StyleGuide: '#no-self-unless-required' Enabled: true VersionAdded: '0.10' VersionChanged: '0.13' +Style/RedundantSelfAssignment: + Description: 'Checks for places where redundant assignments are made for in place modification methods.' + Enabled: pending + Safe: false + VersionAdded: '0.90' + Style/RedundantSort: Description: >- Use `min` instead of `sort.first`, `max_by` instead of `sort_by...last`, etc. Enabled: true @@ -3980,9 +4040,17 @@ Style/SlicingWithRange: Description: 'Checks array slicing is done with endless ranges when suitable.' Enabled: pending VersionAdded: '0.83' Safe: false + +Style/SoleNestedConditional: + Description: >- + Finds sole nested conditional nodes + which can be merged into outer conditional node. + Enabled: pending + VersionAdded: '0.89' + AllowModifier: false Style/SpecialGlobalVars: Description: 'Avoid Perl-style global variables.' StyleGuide: '#no-cryptic-perlisms' Enabled: true