Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump rubocop from 1.42.0 to 1.44.0 #486

Merged
merged 8 commits into from
Jan 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ PATH
remote: .
specs:
rubocop-shopify (2.11.1)
rubocop (~> 1.42)
rubocop (~> 1.44)

GEM
remote: https://rubygems.org/
Expand All @@ -15,7 +15,7 @@ GEM
method_source (1.0.0)
minitest (5.17.0)
parallel (1.22.1)
parser (3.1.3.0)
parser (3.2.0.0)
ast (~> 2.4.1)
pry (0.14.1)
coderay (~> 1.1)
Expand All @@ -25,22 +25,22 @@ GEM
pry (>= 0.13, < 0.15)
rainbow (3.1.1)
rake (13.0.6)
regexp_parser (2.6.1)
regexp_parser (2.6.2)
rexml (3.2.5)
rubocop (1.42.0)
rubocop (1.44.0)
json (~> 2.3)
parallel (~> 1.10)
parser (>= 3.1.2.1)
parser (>= 3.2.0.0)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.24.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.24.1)
parser (>= 3.1.1.0)
ruby-progressbar (1.11.0)
unicode-display_width (2.3.0)
unicode-display_width (2.4.2)

PLATFORMS
ruby
Expand Down
2 changes: 1 addition & 1 deletion rubocop-shopify.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ Gem::Specification.new do |s|

s.required_ruby_version = ">= 2.7.0"

s.add_dependency("rubocop", "~> 1.42")
s.add_dependency("rubocop", "~> 1.44")
end
15 changes: 12 additions & 3 deletions rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ Bundler/OrderedGems:
Gemspec/DeprecatedAttributeAssignment:
Enabled: true

Gemspec/DevelopmentDependencies:
Enabled: false

Gemspec/RequireMFA:
Enabled: false

Expand Down Expand Up @@ -305,6 +308,9 @@ Lint/UriRegexp:
Lint/UselessMethodDefinition:
Enabled: false

Lint/UselessRescue:
Enabled: true

Lint/UselessRuby2Keywords:
Enabled: true

Expand Down Expand Up @@ -445,6 +451,9 @@ Style/CommandLiteral:
Style/CommentedKeyword:
Enabled: false

Style/ComparableClamp:
Enabled: true

Style/ConcatArrayLiterals:
Enabled: true

Expand Down Expand Up @@ -556,6 +565,9 @@ Style/InPatternThen:
Style/InverseMethods:
Enabled: false

Style/InvertibleUnlessCondition:
Enabled: true

Style/KeywordParametersOrder:
Enabled: false

Expand Down Expand Up @@ -784,6 +796,3 @@ Style/WordArray:

Style/YodaCondition:
Enabled: false

Style/YodaExpression:
Enabled: false
46 changes: 45 additions & 1 deletion test/fixtures/full_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,22 @@ Gemspec/DeprecatedAttributeAssignment:
VersionChanged: '1.40'
Include:
- "**/*.gemspec"
Gemspec/DevelopmentDependencies:
Description: Checks that development dependencies are specified in Gemfile rather
than gemspec.
Enabled: false
VersionAdded: '1.44'
EnforcedStyle: Gemfile
SupportedStyles:
- Gemfile
- gems.rb
- gemspec
AllowedGems:
- bundler
Include:
- "**/*.gemspec"
- "**/Gemfile"
- "**/gems.rb"
Gemspec/DuplicatedAssignment:
Description: An attribute assignment method calls should be listed only once in
a gemspec.
Expand Down Expand Up @@ -1815,6 +1831,10 @@ Lint/UselessMethodDefinition:
VersionAdded: '0.90'
VersionChanged: '0.91'
Safe: false
Lint/UselessRescue:
Description: Checks for useless `rescue`s.
Enabled: true
VersionAdded: '1.43'
Lint/UselessRuby2Keywords:
Description: Finds unnecessary uses of `ruby2_keywords`.
Enabled: true
Expand Down Expand Up @@ -2536,6 +2556,11 @@ Style/CommentedKeyword:
SafeAutoCorrect: false
VersionAdded: '0.51'
VersionChanged: '1.19'
Style/ComparableClamp:
Description: Enforces the use of `Comparable#clamp` instead of comparison by minimum
and maximum.
Enabled: true
VersionAdded: '1.44'
Style/ConcatArrayLiterals:
Description: Enforces the use of `Array#push(item)` instead of `Array#concat([item])`
to avoid redundant array literals.
Expand Down Expand Up @@ -2869,7 +2894,8 @@ Style/HashEachMethods:
Safe: false
VersionAdded: '0.80'
VersionChanged: '1.16'
AllowedReceivers: []
AllowedReceivers:
- Thread.current
Style/HashExcept:
Description: Checks for usages of `Hash#reject`, `Hash#select`, and `Hash#filter`
methods that can be replaced with `Hash#except` method.
Expand Down Expand Up @@ -2991,6 +3017,23 @@ Style/InverseMethods:
InverseBlocks:
:select: :reject
:select!: :reject!
Style/InvertibleUnlessCondition:
Description: Favor `if` with inverted condition over `unless`.
Enabled: true
VersionAdded: '1.44'
InverseMethods:
:!=: :==
:>: :<=
:<=: :>
:<: :>=
:>=: :<
:!~: :=~
:zero?: :nonzero?
:nonzero?: :zero?
:any?: :none?
:none?: :any?
:even?: :odd?
:odd?: :even?
Style/IpAddresses:
Description: Don't include literal IP addresses in code.
Enabled: false
Expand Down Expand Up @@ -4113,6 +4156,7 @@ Style/YodaExpression:
Enabled: false
Safe: false
VersionAdded: '1.42'
VersionChanged: '1.43'
SupportedOperators:
- "*"
- "+"
Expand Down