Skip to content

Commit 478d95e

Browse files
committed
(CONT-798) Addressing phantom rubocop rule
1 parent 2575763 commit 478d95e

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
@@ -29,6 +29,12 @@ Lint/MixedRegexpCaptureTypes:
2929
Exclude:
3030
- 'lib/puppet_x/puppetlabs/scheduled_task/trigger.rb'
3131

32+
# Offense count: 2
33+
# This cop supports safe autocorrection (--autocorrect).
34+
Lint/RedundantCopDisableDirective:
35+
Exclude:
36+
- 'spec/integration/puppet_x/puppetlabs/scheduled_task/task_spec.rb'
37+
3238
# Offense count: 19
3339
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
3440
Metrics/AbcSize:
@@ -43,17 +49,17 @@ Metrics/BlockLength:
4349
# Offense count: 4
4450
# Configuration parameters: CountComments, CountAsOne.
4551
Metrics/ClassLength:
46-
Max: 696
52+
Max: 679
4753

4854
# Offense count: 15
4955
# Configuration parameters: AllowedMethods, AllowedPatterns.
5056
Metrics/CyclomaticComplexity:
5157
Max: 49
5258

53-
# Offense count: 26
59+
# Offense count: 25
5460
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
5561
Metrics/MethodLength:
56-
Max: 93
62+
Max: 85
5763

5864
# Offense count: 1
5965
# Configuration parameters: CountComments, CountAsOne.
@@ -118,7 +124,7 @@ RSpec/DescribeClass:
118124
# Offense count: 71
119125
# Configuration parameters: CountAsOne.
120126
RSpec/ExampleLength:
121-
Max: 56
127+
Max: 52
122128

123129
# Offense count: 16
124130
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)