config/upstream.yml in cookstyle-6.6.9 vs config/upstream.yml in cookstyle-6.7.3

- old
+ new

@@ -151,16 +151,17 @@ Bundler/GemComment: Description: 'Add a comment describing each gem.' Enabled: false VersionAdded: '0.59' - VersionChanged: '0.77' + VersionChanged: '0.85' Include: - '**/*.gemfile' - '**/Gemfile' - '**/gems.rb' IgnoredGems: [] + OnlyFor: [] Bundler/InsecureProtocolSource: Description: >- The source `:gemcutter`, `:rubygems` and `:rubyforge` are deprecated because HTTP requests are insecure. Please change your source to @@ -466,10 +467,17 @@ Layout/EmptyLinesAroundAttributeAccessor: Description: "Keep blank lines around attribute accessors." StyleGuide: '#empty-lines-around-attribute-accessor' Enabled: pending VersionAdded: '0.83' + VersionChanged: '0.84' + AllowAliasSyntax: true + AllowedMethods: + - alias_method + - public + - protected + - private Layout/EmptyLinesAroundBeginBody: Description: "Keeps track of empty lines around begin-end bodies." StyleGuide: '#empty-lines-around-bodies' Enabled: true @@ -781,17 +789,11 @@ Layout/HeredocIndentation: Description: 'This cop checks the indentation of the here document bodies.' StyleGuide: '#squiggly-heredocs' Enabled: true VersionAdded: '0.49' - VersionChanged: '0.77' - EnforcedStyle: squiggly - SupportedStyles: - - squiggly - - active_support - - powerpack - - unindent + VersionChanged: '0.85' Layout/IndentationConsistency: Description: 'Keep indentation straight.' StyleGuide: '#spaces-indentation' Enabled: true @@ -855,17 +857,17 @@ Enabled: true VersionAdded: '0.57' VersionChanged: '0.77' Layout/LineLength: - Description: 'Limit lines to 80 characters.' - StyleGuide: '#80-character-limits' + Description: 'Checks that line length does not exceed the configured limit.' + StyleGuide: '#max-line-length' Enabled: true VersionAdded: '0.25' - VersionChanged: '0.78' + VersionChanged: '0.84' AutoCorrect: false - Max: 80 + Max: 120 # To make it possible to copy or click on URIs in the code, we allow lines # containing a URI to be longer than Max. AllowHeredoc: true AllowURI: true URISchemes: @@ -1368,10 +1370,15 @@ Lint/DeprecatedClassMethods: Description: 'Check for deprecated class method calls.' Enabled: true VersionAdded: '0.19' +Lint/DeprecatedOpenSSLConstant: + Description: "Don't use algorithm constants for `OpenSSL::Cipher` and `OpenSSL::Digest`." + Enabled: pending + VersionAdded: '0.84' + Lint/DisjunctiveAssignmentInConstructor: Description: 'In constructor, plain assignment is preferred over disjunctive.' Enabled: true Safe: false VersionAdded: '0.62' @@ -1524,10 +1531,15 @@ # a = 1 # # rubocop:enable SomeCop # .inf for any size MaximumRangeSize: .inf +Lint/MixedRegexpCaptureTypes: + Description: 'Do not mix named captures and numbered captures in a Regexp literal.' + Enabled: pending + VersionAdded: '0.85' + Lint/MultipleComparison: Description: "Use `&&` operator to compare multiple values." Enabled: true VersionAdded: '0.47' VersionChanged: '0.77' @@ -1997,10 +2009,15 @@ Naming/ClassAndModuleCamelCase: Description: 'Use CamelCase for classes and modules.' StyleGuide: '#camelcase-classes' Enabled: true VersionAdded: '0.50' + VersionChanged: '0.85' + # Allowed class/module names can be specified here. + # These can be full or part of the name. + AllowedNames: + - module_parent Naming/ConstantName: Description: 'Constants should use SCREAMING_SNAKE_CASE.' StyleGuide: '#screaming-snake-case' Enabled: true @@ -2017,10 +2034,14 @@ # When `true`, requires that each source file should define a class or module # with a name which matches the file name (converted to ... case). # It further expects it to be nested inside modules which match the names # of subdirectories in its path. ExpectMatchingDefinition: false + # When `false`, changes the behavior of ExpectMatchingDefinition to match only + # whether each source file's class or module name matches the file name -- + # not whether the nested module hierarchy matches the subdirectory path. + CheckDefinitionPathHierarchy: true # If non-`nil`, expect all source file names to match the following regex. # Only the file name itself is matched, not the entire file path. # Use anchors as necessary if you want to match the entire name rather than # just a part of it. Regex: ~ @@ -2208,11 +2229,11 @@ Security/JSONLoad: Description: >- Prefer usage of `JSON.parse` over `JSON.load` due to potential security issues. See reference for more information. - Reference: 'https://ruby-doc.org/stdlib-2.3.0/libdoc/json/rdoc/JSON.html#method-i-load' + Reference: 'https://ruby-doc.org/stdlib-2.7.0/libdoc/json/rdoc/JSON.html#method-i-load' Enabled: true VersionAdded: '0.43' VersionChanged: '0.44' # Autocorrect here will change to a method that may cause crashes depending # on the value of the argument. @@ -2221,11 +2242,11 @@ Security/MarshalLoad: Description: >- Avoid using of `Marshal.load` or `Marshal.restore` due to potential security issues. See reference for more information. - Reference: 'https://ruby-doc.org/core-2.3.3/Marshal.html#module-Marshal-label-Security+considerations' + Reference: 'https://ruby-doc.org/core-2.7.0/Marshal.html#module-Marshal-label-Security+considerations' Enabled: true VersionAdded: '0.47' Security/Open: Description: 'The use of Kernel#open represents a serious security risk.' @@ -2235,11 +2256,11 @@ Security/YAMLLoad: Description: >- Prefer usage of `YAML.safe_load` over `YAML.load` due to potential security issues. See reference for more information. - Reference: 'https://ruby-doc.org/stdlib-2.3.3/libdoc/yaml/rdoc/YAML.html#module-YAML-label-Security' + Reference: 'https://ruby-doc.org/stdlib-2.7.0/libdoc/yaml/rdoc/YAML.html#module-YAML-label-Security' Enabled: true VersionAdded: '0.47' SafeAutoCorrect: false #################### Style ############################### @@ -2272,11 +2293,11 @@ Enabled: true VersionAdded: '0.9' VersionChanged: '0.25' # Whether `and` and `or` are banned only in conditionals (conditionals) # or completely (always). - EnforcedStyle: always + EnforcedStyle: conditionals SupportedStyles: - always - conditionals Style/ArrayJoin: @@ -2692,10 +2713,15 @@ Style/DoubleNegation: Description: 'Checks for uses of double negation (!!).' StyleGuide: '#no-bang-bang' Enabled: true VersionAdded: '0.19' + VersionChanged: '0.84' + EnforcedStyle: allowed_in_returns + SupportedStyles: + - allowed_in_returns + - forbidden Style/EachForSimpleLoop: Description: >- Use `Integer#times` for a simple loop which iterates a fixed number of times. @@ -2855,12 +2881,11 @@ VersionChanged: '0.79' EnforcedStyle: always SupportedStyles: # `always` will always add the frozen string literal comment to a file # regardless of the Ruby version or if `freeze` or `<<` are called on a - # string literal. If you run code against multiple versions of Ruby, it is - # possible that this will create errors in Ruby 2.3.0+. + # string literal. It is possible that this will create errors. - always # `always_true` will add the frozen string literal comment to a file, # similarly to the `always` style, but will also change any disabled # comments (e.g. `# frozen_string_literal: false`) to be enabled. - always_true @@ -3590,9 +3615,19 @@ Style/RedundantPercentQ: Description: 'Checks for %q/%Q when single quotes or double quotes would do.' StyleGuide: '#percent-q' Enabled: true VersionAdded: '0.76' + +Style/RedundantRegexpCharacterClass: + Description: 'Checks for unnecessary single-element Regexp character classes.' + Enabled: pending + VersionAdded: '0.85' + +Style/RedundantRegexpEscape: + Description: 'Checks for redundant escapes in Regexps.' + Enabled: pending + VersionAdded: '0.85' Style/RedundantReturn: Description: "Don't use return where it's not required." StyleGuide: '#no-explicit-return' Enabled: true