Skip to content
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
18 changes: 8 additions & 10 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,6 @@ AllCops:
- 'tmp/**/*'
- 'spec/smoke_tests/**/*.rb'

# Enable when we require rubocop >= 1.71.1 or rubocop-ast >= 1.38.0
InternalAffairs/NodePatternGroups:
Enabled: false

# Enable when we require rubocop >= 1.71.1 or rubocop-ast >= 1.38.0
InternalAffairs/NodeTypeMultiplePredicates:
Enabled: false

InternalAffairs/OnSendWithoutOnCSend:
Enabled: false

Expand Down Expand Up @@ -143,7 +135,7 @@ Style/NumberedParameters:
Style/RequireOrder:
Enabled: true

# Enable RuboCop's pending cops up to v1.71
# Enable RuboCop's pending cops up to v1.72

Gemspec/AddRuntimeDependency: {Enabled: true}
Gemspec/DeprecatedAttributeAssignment: {Enabled: true}
Expand All @@ -159,6 +151,7 @@ Lint/AmbiguousRange: {Enabled: true}
Lint/ArrayLiteralInRegexp: {Enabled: true}
Lint/ConstantOverwrittenInRescue: {Enabled: true}
Lint/ConstantReassignment: {Enabled: true}
Lint/CopDirectiveSyntax: {Enabled: true}
Lint/DeprecatedConstants: {Enabled: true}
Lint/DuplicateBranch: {Enabled: true}
Lint/DuplicateMagicComment: {Enabled: true}
Expand All @@ -181,16 +174,19 @@ Lint/NumericOperationWithConstantResult: {Enabled: true}
Lint/OrAssignmentToConstant: {Enabled: true}
Lint/RedundantDirGlobSort: {Enabled: true}
Lint/RedundantRegexpQuantifiers: {Enabled: true}
Lint/RedundantTypeConversion: {Enabled: true}
Lint/RefinementImportMethods: {Enabled: true}
Lint/RequireRangeParentheses: {Enabled: true}
Lint/RequireRelativeSelfPath: {Enabled: true}
Lint/SharedMutableDefault: {Enabled: true}
Lint/SuppressedExceptionInNumberConversion: {Enabled: true}
Lint/SymbolConversion: {Enabled: true}
Lint/ToEnumArguments: {Enabled: true}
Lint/TripleQuotes: {Enabled: true}
Lint/UnescapedBracketInRegexp: {Enabled: true}
Lint/UnexpectedBlockArity: {Enabled: true}
Lint/UnmodifiedReduceAccumulator: {Enabled: true}
Lint/UselessConstantScoping: {Enabled: true}
Lint/UselessDefined: {Enabled: true}
Lint/UselessNumericOperation: {Enabled: true}
Lint/UselessRescue: {Enabled: true}
Expand Down Expand Up @@ -250,6 +246,7 @@ Style/RedundantCurrentDirectoryInPath: {Enabled: true}
Style/RedundantDoubleSplatHashBraces: {Enabled: true}
Style/RedundantEach: {Enabled: true}
Style/RedundantFilterChain: {Enabled: true}
Style/RedundantFormat: {Enabled: true}
Style/RedundantHeredocDelimiterQuotes: {Enabled: true}
Style/RedundantInitialize: {Enabled: true}
Style/RedundantInterpolationUnfreeze: {Enabled: true}
Expand All @@ -269,7 +266,7 @@ Style/SuperWithArgsParentheses: {Enabled: true}
Style/SwapValues: {Enabled: true}
Style/YAMLFileRead: {Enabled: true}

# Enable RuboCop Performance's pending cops up to v1.23
# Enable RuboCop Performance's pending cops up to v1.24

Performance/AncestorsInclude: {Enabled: true}
Performance/BigDecimalWithNumericArgument: {Enabled: true}
Expand All @@ -291,3 +288,4 @@ Performance/StringBytesize: {Enabled: true}
Performance/StringIdentifierArgument: {Enabled: true}
Performance/StringInclude: {Enabled: true}
Performance/Sum: {Enabled: true}
Performance/ZipWithoutBlock: {Enabled: true}
23 changes: 22 additions & 1 deletion .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,32 @@
# This configuration was generated by
# `rubocop --auto-gen-config --no-offense-counts --no-auto-gen-timestamp`
# using RuboCop version 1.71.2.
# using RuboCop version 1.72.1.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# This cop supports safe autocorrection (--autocorrect).
InternalAffairs/NodePatternGroups:
Exclude:
- 'lib/rubocop/cop/rspec/described_class.rb'
- 'lib/rubocop/cop/rspec/described_class_module_wrapping.rb'
- 'lib/rubocop/cop/rspec/hook_argument.rb'
- 'lib/rubocop/cop/rspec/hooks_before_examples.rb'
- 'lib/rubocop/cop/rspec/no_expectation_example.rb'
- 'lib/rubocop/cop/rspec/pending_without_reason.rb'
- 'lib/rubocop/cop/rspec/redundant_around.rb'
- 'lib/rubocop/rspec/language.rb'

# This cop supports safe autocorrection (--autocorrect).
InternalAffairs/NodeTypeMultiplePredicates:
Exclude:
- 'lib/rubocop/cop/rspec/empty_example_group.rb'
- 'lib/rubocop/cop/rspec/predicate_matcher.rb'
- 'lib/rubocop/cop/rspec/receive_messages.rb'
- 'lib/rubocop/cop/rspec/variable_definition.rb'
- 'lib/rubocop/cop/rspec/variable_name.rb'

Rake/MethodDefinitionInTask:
Exclude:
- 'tasks/cut_release.rake'
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Master (Unreleased)

## 3.5.0 (2025-02-16)

- Don't let `RSpec/PredicateMatcher` replace `respond_to?` with two arguments with the RSpec `respond_to` matcher. ([@bquorning])
- Fix `RSpec/PredicateMatcher` support for `eql` and `equal` matchers. ([@bquorning])
- Pluginfy RuboCop RSpec. ([@koic])
Expand Down
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ gem 'bump'
gem 'rack'
gem 'rake'
gem 'rspec', '~> 3.11'
gem 'rubocop-performance', '~> 1.7'
gem 'rubocop-rake', '~> 0.6'
gem 'rubocop-performance', '~> 1.24'
gem 'rubocop-rake', '~> 0.7'
gem 'simplecov', '>= 0.19'
gem 'yard'

Expand Down
2 changes: 1 addition & 1 deletion docs/antora.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: rubocop-rspec
title: RuboCop RSpec
version: ~
version: '3.5'
nav:
- modules/ROOT/nav.adoc
2 changes: 2 additions & 0 deletions lib/rubocop/cop/rspec/indexed_let.rb
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,9 @@ def on_block(node) # rubocop:disable InternalAffairs/NumblockHandler
private

SUFFIX_INDEX_REGEX = /_?\d+$/.freeze
private_constant :SUFFIX_INDEX_REGEX
INDEX_REGEX = /\d+/.freeze
private_constant :INDEX_REGEX

def filter_indexed_lets(candidates)
candidates
Expand Down
1 change: 1 addition & 0 deletions lib/rubocop/cop/rspec/return_from_stub.rb
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ def heredoc?
end

NULL_BLOCK_BODY = Struct.new(:loc, :source).new(nil, 'nil')
private_constant :NULL_BLOCK_BODY
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/rubocop/rspec/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module RuboCop
module RSpec
# Version information for the RSpec RuboCop plugin.
module Version
STRING = '3.4.0'
STRING = '3.5.0'
end
end
end
Loading