config/upstream.yml in cookstyle-6.11.4 vs config/upstream.yml in cookstyle-6.12.6

- old
+ new

@@ -1395,16 +1395,22 @@ Lint/DisjunctiveAssignmentInConstructor: Description: 'In constructor, plain assignment is preferred over disjunctive.' Enabled: true Safe: false VersionAdded: '0.62' + VersionChanged: '0.88' Lint/DuplicateCaseCondition: Description: 'Do not repeat values in case conditionals.' Enabled: true VersionAdded: '0.45' +Lint/DuplicateElsifCondition: + Description: 'Do not repeat conditions used in if `elsif`.' + Enabled: 'pending' + VersionAdded: '0.88' + Lint/DuplicateHashKey: Description: 'Check for duplicate keys in hash literals.' Enabled: true VersionAdded: '0.34' VersionChanged: '0.77' @@ -2177,21 +2183,22 @@ # Parameter names may be equal to or greater than this value MinNameLength: 3 AllowNamesEndingInNumbers: true # Allowed names that will not register an offense AllowedNames: - - io - - id - - to + - at - by - - 'on' + - db + - id - in - - at + - io - ip - - db + - of + - 'on' - os - pp + - to # Forbidden names that will register an offense ForbiddenNames: [] Naming/PredicateName: Description: 'Check the names of predicate methods.' @@ -2338,10 +2345,18 @@ EnforcedStyle: conditionals SupportedStyles: - always - conditionals +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' + Enabled: 'pending' + VersionAdded: '0.88' + Style/ArrayJoin: Description: 'Use Array#join instead of Array#*.' StyleGuide: '#array-join' Enabled: true VersionAdded: '0.20' @@ -2520,10 +2535,16 @@ # # # good # String === "string" AllowOnConstant: false +Style/CaseLikeIf: + Description: 'This cop identifies places where `if-elsif` constructions can be replaced with `case-when`.' + StyleGuide: '#case-vs-if-else' + Enabled: 'pending' + VersionAdded: '0.88' + Style/CharacterLiteral: Description: 'Checks for uses of character literals.' StyleGuide: '#no-character-literals' Enabled: true VersionAdded: '0.9' @@ -2959,17 +2980,39 @@ VersionChanged: '0.22' # `MinBodyLength` defines the number of lines of the a body of an `if` or `unless` # needs to have to trigger this cop MinBodyLength: 1 +Style/HashAsLastArrayItem: + Description: >- + Checks for presence or absence of braces around hash literal as a last + array item depending on configuration. + StyleGuide: '#hash-literal-as-last-array-item' + Enabled: 'pending' + VersionAdded: '0.88' + EnforcedStyle: braces + SupportedStyles: + - braces + - no_braces + Style/HashEachMethods: Description: 'Use Hash#each_key and Hash#each_value.' StyleGuide: '#hash-each' Enabled: pending VersionAdded: '0.80' Safe: false +Style/HashLikeCase: + Description: >- + Checks for places where `case-when` represents a simple 1:1 + mapping and can be replaced with a hash lookup. + Enabled: 'pending' + VersionAdded: '0.88' + # `MinBranchesCount` defines the number of branches `case` needs to have + # to trigger this cop + MinBranchesCount: 3 + Style/HashSyntax: Description: >- Prefer Ruby 1.9 hash syntax { a: 1, b: 2 } over 1.8 syntax { :a => 1, :b => 2 }. StyleGuide: '#hash-literals' @@ -3662,9 +3705,17 @@ # If enabled, this cop will autocorrect usages of # `fetch` being called with block returning a constant. # This can be dangerous since constants will not be defined at that moment. SafeForConstants: false VersionAdded: '0.86' + +Style/RedundantFileExtensionInRequire: + Description: >- + Checks for the presence of superfluous `.rb` extension in + the filename provided to `require` and `require_relative`. + StyleGuide: '#no-explicit-rb-to-require' + Enabled: 'pending' + VersionAdded: '0.88' Style/RedundantFreeze: Description: "Checks usages of Object#freeze on immutable objects." Enabled: true VersionAdded: '0.34'