From 47a0c737a8a93e79d80b7c9b8bdc6b1053bab555 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carl=20H=C3=B6rberg?= Date: Fri, 14 Jun 2024 02:18:17 +0200 Subject: [PATCH] lint --- .rubocop_todo.yml | 6 +++++- lib/amqp/client/connection.rb | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 60c043d..9f7c29a 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -14,7 +14,7 @@ Lint/RescueException: # Offense count: 19 # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes. Metrics/AbcSize: - Max: 156 + Max: 158 # Offense count: 1 # Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns. @@ -22,6 +22,10 @@ Metrics/AbcSize: Metrics/BlockLength: Max: 40 +# Offense count: 3 +# Configuration parameters: CountBlocks. +Metrics/BlockNesting: + Max: 4 # Offense count: 9 # Configuration parameters: AllowedMethods, AllowedPatterns. diff --git a/lib/amqp/client/connection.rb b/lib/amqp/client/connection.rb index 169ef0b..17ef3b0 100644 --- a/lib/amqp/client/connection.rb +++ b/lib/amqp/client/connection.rb @@ -235,7 +235,7 @@ def read_loop READ_EXCEPTIONS = [IOError, OpenSSL::OpenSSLError, SystemCallError, RUBY_ENGINE == "jruby" ? java.lang.NullPointerException : nil].compact.freeze - def parse_frame(type, channel_id, buf) # rubocop:disable Metrics/MethodLength, Metrics/CyclomaticComplexity + def parse_frame(type, channel_id, buf) # rubocop:disable Metrics/MethodLength channel = @channels[channel_id] case type when 1 # method frame