Skip to content

Commit

Permalink
Vendor rubocop-1.22.0 upstream configuration.
Browse files Browse the repository at this point in the history
Obvious fix; these changes are the result of automation not creative thinking.
  • Loading branch information
tas50 committed Sep 29, 2021
1 parent 82589c4 commit 6689df5
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 7 deletions.
10 changes: 10 additions & 0 deletions config/disable_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,8 @@ Lint/RegexpAsCondition:
Enabled: false
Lint/RequireParentheses:
Enabled: false
Lint/RequireRelativeSelfPath:
Enabled: false
Lint/RescueException:
Enabled: false
Lint/RescueType:
Expand Down Expand Up @@ -705,6 +707,8 @@ Style/MethodCallWithArgsParentheses:
Enabled: false
Style/MultilineInPatternThen:
Enabled: false
Style/NumberedParameters:
Enabled: false
Style/RedundantAssignment:
Enabled: false
Style/RedundantFetchBlock:
Expand Down Expand Up @@ -777,6 +781,8 @@ Style/NonNilCheck:
Enabled: false
Style/Not:
Enabled: false
Style/NumberedParametersLimit:
Enabled: false
Style/NumericLiterals:
Enabled: false
Style/NumericLiteralPrefix:
Expand Down Expand Up @@ -857,6 +863,8 @@ Style/SafeNavigation:
Enabled: false
Style/Sample:
Enabled: false
Style/SelectByRegexp:
Enabled: false
Style/SelfAssignment:
Enabled: false
Style/Semicolon:
Expand Down Expand Up @@ -949,6 +957,8 @@ Style/ZeroLengthPredicate:
Enabled: false
Security/Eval:
Enabled: false
Security/IoMethods:
Enabled: false
Security/JSONLoad:
Enabled: false
Security/MarshalLoad:
Expand Down
49 changes: 43 additions & 6 deletions config/upstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ AllCops:
# 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. 3.0); the teeny version of Ruby
# values are specified as a float (i.e. 3.0); the teeny version of Ruby
# should not be included. If the project specifies a Ruby version in the
# .tool-versions or .ruby-version files, Gemfile or gems.rb file, RuboCop will
# try to determine the desired version of Ruby by inspecting the
Expand Down Expand Up @@ -209,6 +209,7 @@ Bundler/InsecureProtocolSource:
'https://rubygems.org' if possible, or 'http://rubygems.org' if not.
Enabled: true
VersionAdded: '0.50'
AllowHttpProtocol: true
Include:
- '**/*.gemfile'
- '**/Gemfile'
Expand Down Expand Up @@ -1360,10 +1361,11 @@ Layout/SpaceInsideParens:
StyleGuide: '#spaces-braces'
Enabled: true
VersionAdded: '0.49'
VersionChanged: '0.55'
VersionChanged: '1.22'
EnforcedStyle: no_space
SupportedStyles:
- space
- compact
- no_space

Layout/SpaceInsidePercentLiteralDelimiters:
Expand Down Expand Up @@ -1491,9 +1493,9 @@ Lint/BinaryOperatorWithIdenticalOperands:
Lint/BooleanSymbol:
Description: 'Check for `:true` and `:false` symbols.'
Enabled: true
Safe: false
SafeAutoCorrect: false
VersionAdded: '0.50'
VersionChanged: '0.83'
VersionChanged: '1.22'

Lint/CircularArgumentReference:
Description: "Default values in optional keyword arguments and optional ordinal arguments should not refer back to the name of the argument."
Expand Down Expand Up @@ -2045,6 +2047,11 @@ Lint/RequireParentheses:
Enabled: true
VersionAdded: '0.18'

Lint/RequireRelativeSelfPath:
Description: 'Checks for uses a file requiring itself with `require_relative`.'
Enabled: pending
VersionAdded: '1.22'

Lint/RescueException:
Description: 'Avoid rescuing the Exception class.'
StyleGuide: '#no-blind-rescues'
Expand Down Expand Up @@ -2732,6 +2739,14 @@ Security/Eval:
Enabled: true
VersionAdded: '0.47'

Security/IoMethods:
Description: >-
Checks for the first argument to `IO.read`, `IO.binread`, `IO.write`, `IO.binwrite`,
`IO.foreach`, and `IO.readlines`.
Enabled: pending
Safe: false
VersionAdded: '1.22'

Security/JSONLoad:
Description: >-
Prefer usage of `JSON.parse` over `JSON.load` due to potential
Expand Down Expand Up @@ -3703,7 +3718,7 @@ Style/InPatternThen:
Style/InfiniteLoop:
Description: >-
Use Kernel#loop for infinite loops.
This cop is unsafe in the body may raise a `StopIteration` exception.
This cop is unsafe if the body may raise a `StopIteration` exception.
Safe: false
StyleGuide: '#infinite-loop'
Enabled: true
Expand Down Expand Up @@ -4129,6 +4144,21 @@ Style/Not:
VersionAdded: '0.9'
VersionChanged: '0.20'

Style/NumberedParameters:
Description: 'Restrict the usage of numbered parameters.'
Enabled: pending
VersionAdded: '1.22'
EnforcedStyle: allow_single_line
SupportedStyles:
- allow_single_line
- disallow

Style/NumberedParametersLimit:
Description: 'Avoid excessive numbered params in a single block.'
Enabled: pending
VersionAdded: '1.22'
Max: 1

Style/NumericLiteralPrefix:
Description: 'Use smallcase prefixes for numeric literals.'
StyleGuide: '#numeric-literal-prefixes'
Expand All @@ -4139,7 +4169,6 @@ Style/NumericLiteralPrefix:
- zero_with_o
- zero_only


Style/NumericLiterals:
Description: >-
Add underscores to large numeric literals to improve their
Expand Down Expand Up @@ -4460,6 +4489,8 @@ Style/RedundantSort:
`max_by` instead of `sort_by...last`, etc.
Enabled: true
VersionAdded: '0.76'
VersionChanged: '1.22'
Safe: false

Style/RedundantSortBy:
Description: 'Use `sort` instead of `sort_by { |x| x }`.'
Expand Down Expand Up @@ -4540,6 +4571,12 @@ Style/Sample:
Enabled: true
VersionAdded: '0.30'

Style/SelectByRegexp:
Description: 'Prefer grep/grep_v to select/reject with a regexp match.'
Enabled: pending
SafeAutoCorrect: false
VersionAdded: '1.22'

Style/SelfAssignment:
Description: >-
Checks for places where self-assignment shorthand should have
Expand Down
2 changes: 1 addition & 1 deletion lib/cookstyle/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true
module Cookstyle
VERSION = "7.25.4" # rubocop: disable Style/StringLiterals
RUBOCOP_VERSION = '1.21.0'
RUBOCOP_VERSION = '1.22.0'
end

0 comments on commit 6689df5

Please sign in to comment.