Skip to content

Commit

Permalink
Merge pull request #241 from puppetlabs/maint-fix-rubocop-warning
Browse files Browse the repository at this point in the history
(MAINT) - Rubocop linting fixes
  • Loading branch information
Ramesh7 authored Sep 25, 2023
2 parents 607b5eb + e379995 commit 34b255a
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 20 deletions.
30 changes: 15 additions & 15 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,29 +23,29 @@ Lint/BooleanSymbol:
# AllowedMethods: enums
Lint/ConstantDefinitionInBlock:
Exclude:
- 'spec/unit/puppet_x/puppetlabs/scheduled_task/trigger_spec.rb'
- 'spec/unit/puppet_x/puppet_labs/scheduled_task/trigger_spec.rb'

# Offense count: 6
# Configuration parameters: MaximumRangeSize.
Lint/MissingCopEnableDirective:
Exclude:
- 'lib/puppet_x/puppetlabs/scheduled_task/task.rb'
- 'spec/integration/puppet_x/puppetlabs/scheduled_task/task_spec.rb'
- 'lib/puppet_x/puppet_labs/scheduled_task/task.rb'
- 'spec/integration/puppet_x/puppet_labs/scheduled_task/task_spec.rb'
- 'spec/legacy_taskscheduler.rb'
- 'spec/unit/puppet/provider/scheduled_task/win32_taskscheduler_spec.rb'
- 'spec/unit/puppet/type/scheduled_task_spec.rb'
- 'spec/unit/puppet_x/puppetlabs/scheduled_task/trigger_spec.rb'
- 'spec/unit/puppet_x/puppet_labs/scheduled_task/trigger_spec.rb'

# Offense count: 1
Lint/MixedRegexpCaptureTypes:
Exclude:
- 'lib/puppet_x/puppetlabs/scheduled_task/trigger.rb'
- 'lib/puppet_x/puppet_labs/scheduled_task/trigger.rb'

# Offense count: 2
# This cop supports safe autocorrection (--autocorrect).
Lint/RedundantCopDisableDirective:
Exclude:
- 'spec/integration/puppet_x/puppetlabs/scheduled_task/task_spec.rb'
- 'spec/integration/puppet_x/puppet_labs/scheduled_task/task_spec.rb'

# Offense count: 19
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
Expand Down Expand Up @@ -90,7 +90,7 @@ Naming/MemoizedInstanceVariableName:
Exclude:
- 'lib/puppet/provider/scheduled_task/taskscheduler_api2.rb'
- 'lib/puppet/provider/scheduled_task/win32_taskscheduler.rb'
- 'lib/puppet_x/puppetlabs/scheduled_task/task.rb'
- 'lib/puppet_x/puppet_labs/scheduled_task/task.rb'

# Offense count: 2
# Configuration parameters: MinSize.
Expand All @@ -109,8 +109,8 @@ RSpec/Be:
# Prefixes: when, with, without
RSpec/ContextWording:
Exclude:
- 'spec/integration/puppet_x/puppetlabs/scheduled_task/task_spec.rb'
- 'spec/unit/puppet_x/puppetlabs/scheduled_task/trigger_spec.rb'
- 'spec/integration/puppet_x/puppet_labs/scheduled_task/task_spec.rb'
- 'spec/unit/puppet_x/puppet_labs/scheduled_task/trigger_spec.rb'

# Offense count: 5
# Configuration parameters: IgnoredMetadata.
Expand All @@ -123,7 +123,7 @@ RSpec/DescribeClass:
- '**/spec/views/**/*'
- 'spec/acceptance/should_create_task_spec.rb'
- 'spec/acceptance/should_destroy_spec.rb'
- 'spec/integration/puppet_x/puppetlabs/scheduled_task/task_spec.rb'
- 'spec/integration/puppet_x/puppet_labs/scheduled_task/task_spec.rb'
- 'spec/unit/puppet/provider/scheduled_task/win32_taskscheduler_spec.rb'
- 'spec/unit/puppet/type/scheduled_task_spec.rb'

Expand All @@ -135,7 +135,7 @@ RSpec/ExampleLength:
# Offense count: 16
RSpec/LeakyConstantDeclaration:
Exclude:
- 'spec/unit/puppet_x/puppetlabs/scheduled_task/trigger_spec.rb'
- 'spec/unit/puppet_x/puppet_labs/scheduled_task/trigger_spec.rb'

# Offense count: 29
RSpec/MultipleExpectations:
Expand Down Expand Up @@ -163,18 +163,18 @@ RSpec/NoExpectationExample:
# Offense count: 1
RSpec/SpecFilePathFormat:
Exclude:
- 'spec/unit/puppet_x/puppetlabs/scheduled_task/trigger_spec.rb'
- 'spec/unit/puppet_x/puppet_labs/scheduled_task/trigger_spec.rb'

# Offense count: 2
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: EnforcedStyle.
# SupportedStyles: nested, compact
Style/ClassAndModuleChildren:
Exclude:
- 'lib/puppet_x/puppetlabs/scheduled_task/task.rb'
- 'lib/puppet_x/puppetlabs/scheduled_task/trigger.rb'
- 'lib/puppet_x/puppet_labs/scheduled_task/task.rb'
- 'lib/puppet_x/puppet_labs/scheduled_task/trigger.rb'

# Offense count: 6
Style/OpenStructUse:
Exclude:
- 'spec/unit/puppet_x/puppetlabs/scheduled_task/trigger_spec.rb'
- 'spec/unit/puppet_x/puppet_labs/scheduled_task/trigger_spec.rb'
2 changes: 1 addition & 1 deletion lib/puppet/provider/scheduled_task/taskscheduler_api2.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

require 'puppet/parameter'
require_relative '../../../puppet_x/puppetlabs/scheduled_task/task'
require_relative '../../../puppet_x/puppet_labs/scheduled_task/task'

Puppet::Type.type(:scheduled_task).provide(:taskscheduler_api2) do
desc "This provider manages scheduled tasks on Windows.
Expand Down
2 changes: 1 addition & 1 deletion lib/puppet/provider/scheduled_task/win32_taskscheduler.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

require 'puppet/parameter'
require_relative '../../../puppet_x/puppetlabs/scheduled_task/task'
require_relative '../../../puppet_x/puppet_labs/scheduled_task/task'

Puppet::Type.type(:scheduled_task).provide(:win32_taskscheduler) do
desc "This provider manages scheduled tasks on Windows.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
require 'spec_helper'

require_relative '../../../../legacy_taskscheduler' if Puppet.features.microsoft_windows?
require 'puppet_x/puppetlabs/scheduled_task/task'
require 'puppet_x/puppet_labs/scheduled_task/task'

ST = PuppetX::PuppetLabs::ScheduledTask

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
require 'spec_helper'

require_relative '../../../../legacy_taskscheduler' if Puppet.features.microsoft_windows?
require 'puppet_x/puppetlabs/scheduled_task/task'
require 'puppet_x/puppet_labs/scheduled_task/task'

describe Puppet::Type.type(:scheduled_task).provider(:taskscheduler_api2) do
subject(:taskscheduler_api2) { described_class.new }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

require 'spec_helper'
require 'puppet_x/puppetlabs/scheduled_task/trigger'
require 'puppet_x/puppet_labs/scheduled_task/trigger'

describe PuppetX::PuppetLabs::ScheduledTask::Trigger do
subject(:trigger) { described_class }
Expand Down

0 comments on commit 34b255a

Please sign in to comment.