Skip to content

Commit cf85276

Browse files
committed
(CONT-798) Addressing phantom rubocop rule
1 parent 4a1cc07 commit cf85276

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

.rubocop_todo.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This configuration was generated by
22
# `rubocop --auto-gen-config`
3-
# on 2023-04-17 13:50:05 UTC using RuboCop version 1.48.1.
3+
# on 2023-04-18 09:49:53 UTC using RuboCop version 1.48.1.
44
# The point is for the user to remove these configuration records
55
# one by one as the offenses are removed from the code base.
66
# Note that changes in the inspected code, or installation of new
@@ -39,6 +39,12 @@ Lint/MixedRegexpCaptureTypes:
3939
Exclude:
4040
- 'lib/puppet_x/puppetlabs/scheduled_task/trigger.rb'
4141

42+
# Offense count: 2
43+
# This cop supports safe autocorrection (--autocorrect).
44+
Lint/RedundantCopDisableDirective:
45+
Exclude:
46+
- 'spec/integration/puppet_x/puppetlabs/scheduled_task/task_spec.rb'
47+
4248
# Offense count: 19
4349
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
4450
Metrics/AbcSize:
@@ -53,17 +59,17 @@ Metrics/BlockLength:
5359
# Offense count: 4
5460
# Configuration parameters: CountComments, CountAsOne.
5561
Metrics/ClassLength:
56-
Max: 696
62+
Max: 679
5763

5864
# Offense count: 15
5965
# Configuration parameters: AllowedMethods, AllowedPatterns.
6066
Metrics/CyclomaticComplexity:
6167
Max: 49
6268

63-
# Offense count: 26
69+
# Offense count: 25
6470
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
6571
Metrics/MethodLength:
66-
Max: 93
72+
Max: 85
6773

6874
# Offense count: 1
6975
# Configuration parameters: CountComments, CountAsOne.
@@ -128,7 +134,7 @@ RSpec/DescribeClass:
128134
# Offense count: 71
129135
# Configuration parameters: CountAsOne.
130136
RSpec/ExampleLength:
131-
Max: 56
137+
Max: 52
132138

133139
# Offense count: 16
134140
RSpec/LeakyConstantDeclaration:

spec/integration/puppet_x/puppetlabs/scheduled_task/task_spec.rb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -449,8 +449,11 @@ def to_manifest_hash(v1trigger)
449449
end
450450

451451
describe 'When comparing legacy Puppet Win32::TaskScheduler API v1 to Scheduled Tasks API v2', if: Puppet.features.microsoft_windows? do
452-
let(:subjectv1) { Win32::TaskScheduler.new }
453-
let(:subjectv2) { ST::Task }
452+
# There seems to be some sort of false positive hit in the following two lines regarding a Rubocop rule. Locally, this rule wont be picked
453+
# up by rubocop, however, it will fail twice for each line on GitHub Actions. Implementing this disabling workaround to continue with the
454+
# Puppet 8 support work.
455+
let(:subjectv1) { Win32::TaskScheduler.new } # rubocop:disable RSpec/IndexedLet
456+
let(:subjectv2) { ST::Task } # rubocop:disable RSpec/IndexedLet
454457

455458
now = Time.now
456459
default_once_trigger =

0 commit comments

Comments
 (0)