Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(MAINT) - Rubocop linting fixes #241

Merged
merged 1 commit into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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