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
8 changes: 0 additions & 8 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,6 @@ Lint/UnreachableCode:
- 'lib/mongo/protocol/serializers.rb'
- 'spec/runners/unified/test.rb'

# Offense count: 2
# Configuration parameters: AllowedPatterns.
# AllowedPatterns: (?-mix:(exactly|at_least|at_most)\(\d+\)\.times)
Lint/UnreachableLoop:
Exclude:
- 'spec/integration/query_cache_spec.rb'
- 'spec/mongo/cursor_spec.rb'

# Offense count: 5
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowUnusedKeywordArguments, IgnoreEmptyMethods, IgnoreNotImplementedMethods, NotImplementedExceptions.
Expand Down
2 changes: 1 addition & 1 deletion spec/integration/query_cache_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1190,7 +1190,7 @@
context 'using each & break' do
let(:partial_first_iteration) do
called = false
authorized_collection.find.each do
authorized_collection.find.each do # rubocop:disable Lint/UnreachableLoop -- iterate a single document
called = true
break
end
Expand Down
2 changes: 1 addition & 1 deletion spec/mongo/cursor_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@

context 'after #each was called once' do
before do
cursor.each do |_doc|
cursor.each do |_doc| # rubocop:disable Lint/UnreachableLoop -- partially iterate on purpose
break
end
end
Expand Down
Loading