Skip to content

Commit

Permalink
(CONT-792) - Correct Style/RedundantRegexpCharacterClass
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanbreen28 committed Apr 19, 2023
1 parent 902cc7f commit 53c8642
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 17 deletions.
15 changes: 0 additions & 15 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,15 +160,6 @@ Style/ClassAndModuleChildren:
Exclude:
- 'lib/puppet/util/postgresql_validator.rb'

# Offense count: 5
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: EnforcedStyle, AllowedMethods, AllowedPatterns.
# SupportedStyles: predicate, comparison
Style/NumericPredicate:
Exclude:
- 'spec/**/*'
- 'lib/puppet/type/postgresql_psql.rb'

# Offense count: 2
# Configuration parameters: AllowedMethods.
# AllowedMethods: respond_to_missing?
Expand All @@ -177,12 +168,6 @@ Style/OptionalBooleanParameter:
- 'lib/puppet/functions/postgresql/postgresql_password.rb'
- 'lib/puppet/type/postgresql_psql.rb'

# Offense count: 16
# This cop supports safe autocorrection (--autocorrect).
Style/RedundantRegexpCharacterClass:
Exclude:
- 'spec/defines/server/recovery_spec.rb'

# Offense count: 7
# This cop supports safe autocorrection (--autocorrect).
Style/RedundantRegexpEscape:
Expand Down
4 changes: 2 additions & 2 deletions spec/defines/server/recovery_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class { 'postgresql::server': }

it do
expect(subject).to contain_concat__fragment('test-recovery.conf')
.with(content: %r{restore_command = 'restore_command'[\n]+recovery_target_timeline = 'recovery_target_timeline'})
.with(content: %r{restore_command = 'restore_command'\n+recovery_target_timeline = 'recovery_target_timeline'})
end
end

Expand Down Expand Up @@ -103,7 +103,7 @@ class { 'postgresql::server': }

it do
expect(subject).to contain_concat__fragment('test-recovery.conf')
.with(content: %r{restore_command = 'restore_command'[\n]+archive_cleanup_command = 'archive_cleanup_command'[\n]+recovery_end_command = 'recovery_end_command'[\n]+recovery_target_name = 'recovery_target_name'[\n]+recovery_target_time = 'recovery_target_time'[\n]+recovery_target_xid = 'recovery_target_xid'[\n]+recovery_target_inclusive = true[\n]+recovery_target = 'recovery_target'[\n]+recovery_target_timeline = 'recovery_target_timeline'[\n]+pause_at_recovery_target = true[\n]+standby_mode = on[\n]+primary_conninfo = 'primary_conninfo'[\n]+primary_slot_name = 'primary_slot_name'[\n]+trigger_file = 'trigger_file'[\n]+recovery_min_apply_delay = 0[\n]+}) # rubocop:disable Layout/LineLength
.with(content: %r{restore_command = 'restore_command'\n+archive_cleanup_command = 'archive_cleanup_command'\n+recovery_end_command = 'recovery_end_command'\n+recovery_target_name = 'recovery_target_name'\n+recovery_target_time = 'recovery_target_time'\n+recovery_target_xid = 'recovery_target_xid'\n+recovery_target_inclusive = true\n+recovery_target = 'recovery_target'\n+recovery_target_timeline = 'recovery_target_timeline'\n+pause_at_recovery_target = true\n+standby_mode = on\n+primary_conninfo = 'primary_conninfo'\n+primary_slot_name = 'primary_slot_name'\n+trigger_file = 'trigger_file'\n+recovery_min_apply_delay = 0\n+}) # rubocop:disable Layout/LineLength
end
end
end

0 comments on commit 53c8642

Please sign in to comment.