From 27660b69bbea398d14c9c0414c7fe018aeb6003a Mon Sep 17 00:00:00 2001 From: jordanbreen28 Date: Wed, 19 Apr 2023 17:15:08 +0100 Subject: [PATCH] (CONT-792) - Correct Lint/RedundantCopEnableDirective --- .rubocop_todo.yml | 6 ------ lib/puppet/type/postgresql_psql.rb | 1 - 2 files changed, 7 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 144fe015e0..abe7689643 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -13,12 +13,6 @@ Lint/ConstantDefinitionInBlock: Exclude: - 'spec/unit/puppet/provider/postgresql_replication_slot/ruby_spec.rb' -# Offense count: 1 -# This cop supports safe autocorrection (--autocorrect). -Lint/RedundantCopEnableDirective: - Exclude: - - 'lib/puppet/type/postgresql_psql.rb' - # Offense count: 6 # Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes. Metrics/AbcSize: diff --git a/lib/puppet/type/postgresql_psql.rb b/lib/puppet/type/postgresql_psql.rb index 01315ce2d2..2c701dcf22 100644 --- a/lib/puppet/type/postgresql_psql.rb +++ b/lib/puppet/type/postgresql_psql.rb @@ -39,7 +39,6 @@ def sync def matches(value) output, status = provider.run_unless_sql_command(value) fail("Error evaluating 'unless' clause, returned #{status}: '#{output}'") unless status.zero? # rubocop:disable Style/SignalException - # rubocop:enable Style/NumericPredicate result_count = output.strip.to_i debug("Found #{result_count} row(s) executing 'unless' clause")