config/upstream.yml in cookstyle-7.5.3 vs config/upstream.yml in cookstyle-7.6.1
- old
+ new
@@ -130,16 +130,17 @@
# What MRI version of the Ruby interpreter is the inspected code intended to
# run on? (If there is more than one, set this to the lowest version.)
# If a value is specified for TargetRubyVersion then it is used. Acceptable
# values are specificed as a float (i.e. 2.5); the teeny version of Ruby
# should not be included. If the project specifies a Ruby version in the
- # .ruby-version file, Gemfile or gems.rb file, RuboCop will try to determine
- # the desired version of Ruby by inspecting the .ruby-version file first,
- # followed by the Gemfile.lock or gems.locked file. (Although the Ruby version
- # is specified in the Gemfile or gems.rb file, RuboCop reads the final value
- # from the lock file.) If the Ruby version is still unresolved, RuboCop will
- # use the oldest officially supported Ruby version (currently Ruby 2.4).
+ # .tool-versions or .ruby-version files, Gemfile or gems.rb file, RuboCop will
+ # try to determine the desired version of Ruby by inspecting the
+ # .tool-versions file first, then .ruby-version, followed by the Gemfile.lock
+ # or gems.locked file. (Although the Ruby version is specified in the Gemfile
+ # or gems.rb file, RuboCop reads the final value from the lock file.) If the
+ # Ruby version is still unresolved, RuboCop will use the oldest officially
+ # supported Ruby version (currently Ruby 2.4).
TargetRubyVersion: ~
# Determines if a notification for extension libraries should be shown when
# rubocop is run. Keys are the name of the extension, and values are an array
# of gems in the Gemfile that the extension is suggested for, if not already
# included.
@@ -1195,11 +1196,10 @@
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'
@@ -1467,10 +1467,38 @@
Lint/DeprecatedClassMethods:
Description: 'Check for deprecated class method calls.'
Enabled: true
VersionAdded: '0.19'
+Lint/DeprecatedConstants:
+ Description: 'Checks for deprecated constants.'
+ Enabled: pending
+ VersionAdded: '1.8'
+ # You can configure deprecated constants.
+ # If there is an alternative method, you can set alternative value as `Alternative`.
+ # And you can set the deprecated version as `DeprecatedVersion`.
+ # These options can be omitted if they are not needed.
+ #
+ # DeprecatedConstants:
+ # 'DEPRECATED_CONSTANT':
+ # Alternative: 'alternative_value'
+ # DeprecatedVersion: 'deprecated_version'
+ #
+ DeprecatedConstants:
+ 'NIL':
+ Alternative: 'nil'
+ DeprecatedVersion: '2.4'
+ 'TRUE':
+ Alternative: 'true'
+ DeprecatedVersion: '2.4'
+ 'FALSE':
+ Alternative: 'false'
+ DeprecatedVersion: '2.4'
+ 'Random::DEFAULT':
+ Alternative: 'Random.new'
+ DeprecatedVersion: '3.0'
+
Lint/DeprecatedOpenSSLConstant:
Description: "Don't use algorithm constants for `OpenSSL::Cipher` and `OpenSSL::Digest`."
Enabled: true
VersionAdded: '0.84'
@@ -1672,10 +1700,15 @@
Enabled: true
Safe: false
VersionAdded: '0.50'
VersionChanged: '0.87'
+Lint/LambdaWithoutLiteralBlock:
+ Description: 'Checks uses of lambda without a literal block.'
+ Enabled: pending
+ VersionAdded: '1.8'
+
Lint/LiteralAsCondition:
Description: 'Checks of literals used in conditions.'
Enabled: true
VersionAdded: '0.51'
@@ -1771,10 +1804,21 @@
IgnoredMethods: []
IgnoredClasses:
- Time
- DateTime
+Lint/NumberedParameterAssignment:
+ Description: 'Checks for uses of numbered parameter assignment.'
+ Enabled: pending
+ VersionAdded: '1.9'
+
+Lint/OrAssignmentToConstant:
+ Description: 'Checks unintended or-assignment to constant.'
+ Enabled: pending
+ Safe: false
+ VersionAdded: '1.9'
+
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'
@@ -1834,10 +1878,15 @@
Lint/RedundantCopEnableDirective:
Description: Checks for rubocop:enable comments that can be removed.
Enabled: true
VersionAdded: '0.76'
+Lint/RedundantDirGlobSort:
+ Description: 'Checks for redundant `sort` method to `Dir.glob` and `Dir[]`.'
+ Enabled: pending
+ VersionAdded: '1.8'
+
Lint/RedundantRequireStatement:
Description: 'Checks for unnecessary `require` statement.'
Enabled: true
VersionAdded: '0.76'
@@ -1992,16 +2041,20 @@
Enabled: true
AllowComments: true
VersionAdded: '0.9'
VersionChanged: '0.81'
+Lint/SymbolConversion:
+ Description: 'Checks for unnecessary symbol conversions.'
+ Enabled: pending
+ VersionAdded: '1.9'
+
Lint/Syntax:
- Description: 'Checks syntax error.'
+ Description: 'Checks for syntax errors.'
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'
@@ -2018,10 +2071,15 @@
Lint/TrailingCommaInAttributeDeclaration:
Description: 'This cop checks for trailing commas in attribute declarations.'
Enabled: true
VersionAdded: '0.90'
+Lint/TripleQuotes:
+ Description: 'Checks for useless triple quote constructs.'
+ Enabled: pending
+ VersionAdded: '1.9'
+
Lint/UnderscorePrefixedVariableName:
Description: 'Do not use prefix `_` for a variable that is used.'
Enabled: true
VersionAdded: '0.21'
AllowKeywordBlockArguments: false
@@ -2500,14 +2558,16 @@
Naming/VariableName:
Description: 'Use the configured style when naming variables.'
StyleGuide: '#snake-case-symbols-methods-vars'
Enabled: true
VersionAdded: '0.50'
+ VersionChanged: '1.8'
EnforcedStyle: snake_case
SupportedStyles:
- snake_case
- camelCase
+ AllowedIdentifiers: []
Naming/VariableNumber:
Description: 'Use the configured style when numbering symbols, methods and variables.'
StyleGuide: '#snake-case-symbols-methods-vars-with-numbers'
Enabled: true
@@ -2647,11 +2707,12 @@
Description: 'Use only ascii symbols in comments.'
StyleGuide: '#english-comments'
Enabled: true
VersionAdded: '0.9'
VersionChanged: '0.52'
- AllowedChars: []
+ AllowedChars:
+ - ©
Style/Attr:
Description: 'Checks for uses of Module#attr.'
StyleGuide: '#attr'
Enabled: true
@@ -3078,10 +3139,12 @@
Style/DisableCopsWithinSourceCodeDirective:
Description: >-
Forbids disabling/enabling cops within source code.
Enabled: false
VersionAdded: '0.82'
+ VersionChanged: '1.9'
+ AllowedCops: []
Style/DocumentDynamicEvalDefinition:
Description: >-
When using `class_eval` (or other `eval`) with string interpolation,
add a comment block showing its appearance if interpolated.
@@ -3195,10 +3258,21 @@
StyleGuide: '#no-END-blocks'
Enabled: true
VersionAdded: '0.9'
VersionChanged: '0.81'
+Style/EndlessMethod:
+ Description: 'Avoid the use of multi-lined endless method definitions.'
+ StyleGuide: '#endless-methods'
+ Enabled: pending
+ VersionAdded: '1.8'
+ EnforcedStyle: allow_single_line
+ SupportedStyles:
+ - allow_single_line
+ - allow_always
+ - disallow
+
Style/EvalWithLocation:
Description: 'Pass `__FILE__` and `__LINE__` to `eval` method, as they are used by backtraces.'
Enabled: true
VersionAdded: '0.52'
@@ -3218,13 +3292,12 @@
Description: >-
Consider using explicit block argument to avoid writing block literal
that just passes its arguments to another block.
StyleGuide: '#block-argument'
Enabled: true
- # May change the yielding arity.
- Safe: false
VersionAdded: '0.89'
+ VersionChanged: '1.8'
Style/ExponentialNotation:
Description: 'When using exponential notation, favor a mantissa between 1 (inclusive) and 10 (exclusive).'
StyleGuide: '#exponential-notation'
Enabled: true
@@ -3239,11 +3312,12 @@
Description: 'For performing float division, coerce one side only.'
StyleGuide: '#float-division'
Reference: 'https://blog.rubystyle.guide/ruby/2019/06/21/float-division.html'
Enabled: true
VersionAdded: '0.72'
- VersionChanged: '1.6'
+ VersionChanged: '1.9'
+ Safe: false
EnforcedStyle: single_coerce
SupportedStyles:
- left_coerce
- right_coerce
- single_coerce
@@ -3287,10 +3361,11 @@
# style token in a format string to be allowed when enforced style is not
# `unannotated`.
MaxUnannotatedPlaceholdersAllowed: 1
VersionAdded: '0.49'
VersionChanged: '1.0'
+ IgnoredMethods: []
Style/FrozenStringLiteralComment:
Description: >-
Add the frozen_string_literal comment to the top of files
to help transition to frozen string literals by default.
@@ -3440,10 +3515,15 @@
Avoid modifier if/unless usage on conditionals.
Enabled: true
VersionAdded: '0.39'
VersionChanged: '0.87'
+Style/IfWithBooleanLiteralBranches:
+ Description: 'Checks for redundant `if` with boolean literal branches.'
+ Enabled: pending
+ VersionAdded: '1.9'
+
Style/IfWithSemicolon:
Description: 'Do not use if x; .... Use the ternary operator instead.'
StyleGuide: '#no-semicolon-ifs'
Enabled: true
VersionAdded: '0.9'
@@ -3724,11 +3804,12 @@
Style/MutableConstant:
Description: 'Do not assign mutable objects to constants.'
Enabled: true
VersionAdded: '0.34'
- VersionChanged: '0.65'
+ VersionChanged: '1.8'
+ SafeAutoCorrect: false
EnforcedStyle: literals
SupportedStyles:
# literals: freeze literals assigned to constants
# strict: freeze all constants
# Strict mode is considered an experimental feature. It has not been updated
@@ -4328,10 +4409,10 @@
Style/SingleLineMethods:
Description: 'Avoid single-line methods.'
StyleGuide: '#no-single-line-methods'
Enabled: true
VersionAdded: '0.9'
- VersionChanged: '1.7'
+ VersionChanged: '1.8'
AllowIfMethodIsEmpty: true
Style/SlicingWithRange:
Description: 'Checks array slicing is done with endless ranges when suitable.'
Enabled: true