config/upstream.yml in cookstyle-6.10.2 vs config/upstream.yml in cookstyle-6.11.4
- old
+ new
@@ -178,10 +178,13 @@
Gems within groups in the Gemfile should be alphabetically sorted.
Enabled: true
VersionAdded: '0.46'
VersionChanged: '0.47'
TreatCommentsAsGroupSeparators: true
+ # By default, "-" and "_" are ignored for order purposes.
+ # This can be overridden by setting this parameter to true.
+ ConsiderPunctuation: false
Include:
- '**/*.gemfile'
- '**/Gemfile'
- '**/gems.rb'
@@ -198,10 +201,13 @@
Description: >-
Dependencies in the gemspec should be alphabetically sorted.
Enabled: true
VersionAdded: '0.51'
TreatCommentsAsGroupSeparators: true
+ # By default, "-" and "_" are ignored for order purposes.
+ # This can be overridden by setting this parameter to true.
+ ConsiderPunctuation: false
Include:
- '**/*.gemspec'
Gemspec/RequiredRubyVersion:
Description: 'Checks that `required_ruby_version` of gemspec and `TargetRubyVersion` of .rubocop.yml are equal.'
@@ -1506,11 +1512,13 @@
- standard_error
Lint/InterpolationCheck:
Description: 'Raise warning for interpolation in single q strs.'
Enabled: true
+ SafeAutoCorrect: false
VersionAdded: '0.50'
+ VersionChanged: '0.87'
Lint/LiteralAsCondition:
Description: 'Checks of literals used in conditions.'
Enabled: true
VersionAdded: '0.51'
@@ -1734,10 +1742,11 @@
Lint/SafeNavigationWithEmpty:
Description: 'Avoid `foo&.empty?` in conditionals.'
Enabled: true
VersionAdded: '0.62'
+ VersionChanged: '0.87'
Lint/ScriptPermission:
Description: 'Grant script file execute permission.'
Enabled: true
VersionAdded: '0.49'
@@ -1900,13 +1909,14 @@
Metrics/BlockLength:
Description: 'Avoid long blocks with many lines.'
Enabled: true
VersionAdded: '0.44'
- VersionChanged: '0.66'
+ VersionChanged: '0.87'
CountComments: false # count full line comments?
Max: 25
+ CountAsOne: []
ExcludedMethods:
# By default, exclude the `#refine` method, as it tends to have larger
# associated blocks.
- refine
Exclude:
@@ -1923,12 +1933,14 @@
Metrics/ClassLength:
Description: 'Avoid classes longer than 100 lines of code.'
Enabled: true
VersionAdded: '0.25'
+ VersionChanged: '0.87'
CountComments: false # count full line comments?
Max: 100
+ CountAsOne: []
# Avoid complex methods.
Metrics/CyclomaticComplexity:
Description: >-
A complexity metric that is strongly correlated to the number
@@ -1942,21 +1954,24 @@
Metrics/MethodLength:
Description: 'Avoid methods longer than 10 lines of code.'
StyleGuide: '#short-methods'
Enabled: true
VersionAdded: '0.25'
- VersionChanged: '0.59.2'
+ VersionChanged: '0.87'
CountComments: false # count full line comments?
Max: 10
+ CountAsOne: []
ExcludedMethods: []
Metrics/ModuleLength:
Description: 'Avoid modules longer than 100 lines of code.'
Enabled: true
VersionAdded: '0.31'
+ VersionChanged: '0.87'
CountComments: false # count full line comments?
Max: 100
+ CountAsOne: []
Metrics/ParameterLists:
Description: 'Avoid parameter lists longer than three or four parameters.'
StyleGuide: '#too-many-params'
Enabled: true
@@ -1990,14 +2005,16 @@
StyleGuide: '#accessor_mutator_method_names'
Enabled: true
VersionAdded: '0.50'
Naming/AsciiIdentifiers:
- Description: 'Use only ascii symbols in identifiers.'
+ Description: 'Use only ascii symbols in identifiers and constants.'
StyleGuide: '#english-identifiers'
Enabled: true
VersionAdded: '0.50'
+ VersionChanged: '0.87'
+ AsciiConstants: true
Naming/BinaryOperatorParameterName:
Description: 'When defining binary operators, name the argument other.'
StyleGuide: '#other-arg'
Enabled: true
@@ -2286,10 +2303,21 @@
SupportedStyles:
- inline
- group
AllowModifiersOnSymbols: true
+Style/AccessorGrouping:
+ Description: 'Checks for grouping of accessors in `class` and `module` bodies.'
+ Enabled: 'pending'
+ VersionAdded: '0.87'
+ EnforcedStyle: grouped
+ SupportedStyles:
+ # separated: each accessor goes in a separate statement.
+ # grouped: accessors are grouped into a single statement.
+ - separated
+ - grouped
+
Style/Alias:
Description: 'Use alias instead of alias_method.'
StyleGuide: '#alias-method-lexically'
Enabled: true
VersionAdded: '0.9'
@@ -2353,10 +2381,17 @@
Description: 'Avoid the use of BEGIN blocks.'
StyleGuide: '#no-BEGIN-blocks'
Enabled: true
VersionAdded: '0.9'
+Style/BisectedAttrAccessor:
+ Description: >-
+ Checks for places where `attr_reader` and `attr_writer`
+ for the same method can be combined into single `attr_accessor`.
+ Enabled: 'pending'
+ VersionAdded: '0.87'
+
Style/BlockComments:
Description: 'Do not use block comments.'
StyleGuide: '#no-block-comments'
Enabled: true
VersionAdded: '0.9'
@@ -2727,10 +2762,11 @@
StyleGuide: '#no-bang-bang'
Enabled: true
VersionAdded: '0.19'
VersionChanged: '0.84'
EnforcedStyle: allowed_in_returns
+ SafeAutoCorrect: false
SupportedStyles:
- allowed_in_returns
- forbidden
Style/EachForSimpleLoop:
@@ -2993,10 +3029,11 @@
Style/IfUnlessModifierOfIfUnless:
Description: >-
Avoid modifier if/unless usage on conditionals.
Enabled: true
VersionAdded: '0.39'
+ VersionChanged: '0.87'
Style/IfWithSemicolon:
Description: 'Do not use if x; .... Use the ternary operator instead.'
StyleGuide: '#no-semicolon-ifs'
Enabled: true
@@ -3579,10 +3616,15 @@
integers with offsets.
StyleGuide: '#random-numbers'
Enabled: true
VersionAdded: '0.52'
+Style/RedundantAssignment:
+ Description: 'Checks for redundant assignment before returning.'
+ Enabled: 'pending'
+ VersionAdded: '0.87'
+
Style/RedundantBegin:
Description: "Don't use begin blocks when they are not needed."
StyleGuide: '#begin-implicit'
Enabled: true
VersionAdded: '0.10'
@@ -3922,10 +3964,10 @@
VersionAdded: '0.30'
Style/SymbolProc:
Description: 'Use symbols as procs instead of blocks when possible.'
Enabled: true
- SafeAutoCorrect: false
+ Safe: false
VersionAdded: '0.26'
VersionChanged: '0.64'
# A list of method names to be ignored by the check.
# The names should be fairly unique, otherwise you'll end up ignoring lots of code.
IgnoredMethods: