diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 11bb45a214..6a912e2d20 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -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. diff --git a/spec/integration/query_cache_spec.rb b/spec/integration/query_cache_spec.rb index 935e311ca2..63f9c9d9a9 100644 --- a/spec/integration/query_cache_spec.rb +++ b/spec/integration/query_cache_spec.rb @@ -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 diff --git a/spec/mongo/cursor_spec.rb b/spec/mongo/cursor_spec.rb index ba79b050eb..10c8446932 100644 --- a/spec/mongo/cursor_spec.rb +++ b/spec/mongo/cursor_spec.rb @@ -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