From d53b68c757f20eae8413f2f7ba524d28fb312077 Mon Sep 17 00:00:00 2001 From: William Montgomery Date: Wed, 7 Feb 2024 11:15:22 -0500 Subject: [PATCH 1/2] Remove redundant call to #to_s --- .rubocop_todo.yml | 6 ------ examples/consistency.rb | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 85908a89a..7797e6ca4 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -11,12 +11,6 @@ Lint/HashCompareByIdentity: Exclude: - 'lib/redis.rb' -# Offense count: 1 -# Cop supports --auto-correct. -Lint/RedundantStringCoercion: - Exclude: - - 'examples/consistency.rb' - # Offense count: 2 # Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers. # SupportedStyles: snake_case, normalcase, non_integer diff --git a/examples/consistency.rb b/examples/consistency.rb index 3c54eaf5f..e56e049df 100644 --- a/examples/consistency.rb +++ b/examples/consistency.rb @@ -52,7 +52,7 @@ def initialize(redis) def genkey # Write more often to a small subset of keys ks = rand > 0.5 ? @keyspace : @working_set - "#{@prefix}key_#{rand(ks).to_s}" + "#{@prefix}key_#{rand(ks)}" end def check_consistency(key, value) From f0abed34c5252e3e08f20f394756fd3f13256620 Mon Sep 17 00:00:00 2001 From: William Montgomery Date: Wed, 7 Feb 2024 13:01:08 -0500 Subject: [PATCH 2/2] Remove Rubocop exclusion for test/remote_server_control_commands_test.rb --- .rubocop_todo.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 7797e6ca4..2a3d18715 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -11,14 +11,6 @@ Lint/HashCompareByIdentity: Exclude: - 'lib/redis.rb' -# Offense count: 2 -# Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers. -# SupportedStyles: snake_case, normalcase, non_integer -# AllowedIdentifiers: capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339 -Naming/VariableNumber: - Exclude: - - 'test/remote_server_control_commands_test.rb' - # Offense count: 6 # Configuration parameters: AllowedMethods. # AllowedMethods: respond_to_missing?