Skip to content

Commit

Permalink
(maint) - Regenerate todo
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanbreen28 committed Oct 2, 2023
1 parent a3ffefa commit a853b96
Show file tree
Hide file tree
Showing 7 changed files with 43 additions and 56 deletions.
85 changes: 35 additions & 50 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2023-09-29 10:39:55 UTC using RuboCop version 1.56.4.
# on 2023-10-02 10:16:22 UTC using RuboCop version 1.56.4.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
Expand All @@ -13,6 +13,11 @@ Lint/DuplicateBranch:
- 'lib/rspec-puppet/matchers/compile.rb'
- 'lib/rspec-puppet/matchers/run.rb'

# Offense count: 1
Lint/DuplicateMethods:
Exclude:
- 'lib/rspec-puppet/adapters.rb'

# Offense count: 2
# Configuration parameters: AllowComments, AllowEmptyLambdas.
Lint/EmptyBlock:
Expand Down Expand Up @@ -59,48 +64,48 @@ Lint/UselessAssignment:
- 'lib/rspec-puppet/matchers/create_generic.rb'
- 'lib/rspec-puppet/monkey_patches.rb'

# Offense count: 29
# Offense count: 27
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
Metrics/AbcSize:
Max: 47
Max: 56

# Offense count: 7
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns, inherit_mode.
# AllowedMethods: refine
Metrics/BlockLength:
Max: 111

# Offense count: 3
# Offense count: 1
# Configuration parameters: CountBlocks.
Metrics/BlockNesting:
Max: 4

# Offense count: 5
# Offense count: 6
# Configuration parameters: CountComments, CountAsOne.
Metrics/ClassLength:
Max: 297

# Offense count: 19
# Offense count: 18
# Configuration parameters: AllowedMethods, AllowedPatterns.
Metrics/CyclomaticComplexity:
Max: 18

# Offense count: 53
# Offense count: 47
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
Metrics/MethodLength:
Max: 37
Max: 49

# Offense count: 2
# Configuration parameters: CountComments, CountAsOne.
Metrics/ModuleLength:
Max: 422
Max: 388

# Offense count: 2
# Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
Metrics/ParameterLists:
Max: 9

# Offense count: 14
# Offense count: 13
# Configuration parameters: AllowedMethods, AllowedPatterns.
Metrics/PerceivedComplexity:
Max: 20
Expand Down Expand Up @@ -181,42 +186,27 @@ RSpec/BeforeAfterAll:
- '**/spec/support/**/*.rb'
- 'spec/unit/coverage_spec.rb'

# Offense count: 76
# Offense count: 74
# Configuration parameters: Prefixes, AllowedPatterns.
# Prefixes: when, with, without
RSpec/ContextWording:
Enabled: false

# Offense count: 90
# Offense count: 89
# Configuration parameters: IgnoredMetadata.
RSpec/DescribeClass:
Enabled: false

# Offense count: 25
# Offense count: 23
# Configuration parameters: CountAsOne.
RSpec/ExampleLength:
Max: 12

# Offense count: 15
# Offense count: 16
# Configuration parameters: Include, CustomTransform, IgnoreMethods, SpecSuffixOnly.
# Include: **/*_spec*rb*, **/spec/**/*
RSpec/FilePath:
Exclude:
- 'spec/cache_spec.rb'
- 'spec/classes/test_multi_os.rb'
- 'spec/raw_string_spec.rb'
- 'spec/support_spec.rb'
- 'spec/unit/coverage_spec.rb'
- 'spec/unit/example/function_example_group_spec.rb'
- 'spec/unit/facter_impl_spec.rb'
- 'spec/unit/matchers/allow_value_spec.rb'
- 'spec/unit/matchers/count_generic_spec.rb'
- 'spec/unit/matchers/parameter_matcher_spec.rb'
- 'spec/unit/matchers/raise_error_spec.rb'
- 'spec/unit/matchers/run_spec.rb'
- 'spec/unit/monkey_patches/win32/taskscheduler_spec.rb'
- 'spec/unit/raw_string_spec.rb'
- 'spec/unit/sensitive_spec.rb'
Enabled: false

# Offense count: 2
RSpec/ImplicitBlockExpectation:
Expand All @@ -234,7 +224,7 @@ RSpec/InstanceVariable:
- 'spec/types/cleanup_spec.rb'
- 'spec/unit/coverage_spec.rb'

# Offense count: 11
# Offense count: 10
# Configuration parameters: .
# SupportedStyles: have_received, receive
RSpec/MessageSpies:
Expand All @@ -248,10 +238,10 @@ RSpec/MultipleDescribes:
- 'spec/classes/sysctl_common_spec.rb'
- 'spec/defines/sysctl_before_spec.rb'
- 'spec/functions/test_function_spec.rb'
- 'spec/unit/adapters_spec.rb'
- 'spec/unit/example/function_example_group_spec.rb'
- 'spec/unit/monkey_patches_spec.rb'

# Offense count: 46
# Offense count: 45
RSpec/MultipleExpectations:
Max: 8

Expand All @@ -260,13 +250,13 @@ RSpec/MultipleExpectations:
RSpec/MultipleMemoizedHelpers:
Max: 7

# Offense count: 284
# Offense count: 263
# Configuration parameters: EnforcedStyle, IgnoreSharedExamples.
# SupportedStyles: always, named_only
RSpec/NamedSubject:
Enabled: false

# Offense count: 20
# Offense count: 26
# Configuration parameters: AllowedGroups.
RSpec/NestedGroups:
Max: 5
Expand All @@ -291,14 +281,15 @@ RSpec/RepeatedExample:
Exclude:
- 'spec/types/valid_provider_spec.rb'

# Offense count: 7
# Offense count: 9
RSpec/RepeatedExampleGroupDescription:
Exclude:
- 'spec/classes/facts_spec.rb'
- 'spec/classes/sysctl_common_spec.rb'
- 'spec/defines/sysctl_before_spec.rb'
- 'spec/unit/adapters_spec.rb'

# Offense count: 14
# Offense count: 15
# Configuration parameters: Include, CustomTransform, IgnoreMethods, IgnoreMetadata.
# Include: **/*_spec.rb
RSpec/SpecFilePathFormat:
Expand All @@ -307,10 +298,11 @@ RSpec/SpecFilePathFormat:
- 'spec/cache_spec.rb'
- 'spec/raw_string_spec.rb'
- 'spec/support_spec.rb'
- 'spec/unit/adapters_spec.rb'
- 'spec/unit/coverage_spec.rb'
- 'spec/unit/example/function_example_group_spec.rb'
- 'spec/unit/facter_impl_spec.rb'
- 'spec/unit/matchers/allow_value_spec.rb'
- 'spec/unit/matchers/compile_spec.rb'
- 'spec/unit/matchers/count_generic_spec.rb'
- 'spec/unit/matchers/parameter_matcher_spec.rb'
- 'spec/unit/matchers/raise_error_spec.rb'
Expand All @@ -326,18 +318,12 @@ RSpec/SpecFilePathSuffix:
Exclude:
- 'spec/classes/test_multi_os.rb'

# Offense count: 3
# Offense count: 2
RSpec/SubjectStub:
Exclude:
- 'spec/unit/adapters_spec.rb'
- 'spec/unit/coverage_spec.rb'

# Offense count: 1
RSpec/UnspecifiedException:
Exclude:
- 'spec/support_spec.rb'

# Offense count: 16
# Offense count: 7
# Configuration parameters: IgnoreNameless, IgnoreSymbolicNames.
RSpec/VerifiedDoubles:
Exclude:
Expand Down Expand Up @@ -365,7 +351,7 @@ Style/CombinableLoops:
Exclude:
- 'spec/classes/catalogue_cache_spec.rb'

# Offense count: 65
# Offense count: 55
# Configuration parameters: AllowedConstants.
Style/Documentation:
Enabled: false
Expand All @@ -378,15 +364,14 @@ Style/FormatString:
Exclude:
- 'lib/rspec-puppet/coverage.rb'

# Offense count: 15
# Offense count: 14
# This cop supports safe autocorrection (--autocorrect).
Style/IfUnlessModifier:
Exclude:
- 'lib/rspec-puppet/adapters.rb'
- 'lib/rspec-puppet/coverage.rb'
- 'lib/rspec-puppet/example/function_example_group.rb'
- 'lib/rspec-puppet/matchers/create_generic.rb'
- 'lib/rspec-puppet/monkey_patches.rb'
- 'lib/rspec-puppet/support.rb'

# Offense count: 5
Expand Down Expand Up @@ -424,7 +409,7 @@ Style/StringConcatenation:
- 'lib/rspec-puppet/matchers/compile.rb'
- 'lib/rspec-puppet/support.rb'

# Offense count: 28
# Offense count: 26
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
# URISchemes: http, https
Expand Down
2 changes: 1 addition & 1 deletion lib/rspec-puppet/adapters.rb
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ def setup_puppet(example_group)
{
environments: loader,
current_environment: env,
loaders: (Puppet::Pops::Loaders.new(env))
loaders: Puppet::Pops::Loaders.new(env)
},
'Setup rspec-puppet environments'
)
Expand Down
4 changes: 2 additions & 2 deletions lib/rspec-puppet/example/function_example_group.rb
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def find_function(function_name = self.class.top_level_description)
loaders = Puppet.lookup(:loaders)
Puppet.override(context_overrides, 'rspec-test scope') do
func = V4FunctionWrapper.new(function_name,
loaders.private_environment_loader.load(:function, function_name), context_overrides)
loaders.private_environment_loader.load(:function, function_name), context_overrides)
@scope = context_overrides[:global_scope]
end

Expand Down Expand Up @@ -175,7 +175,7 @@ def build_compiler
compiler
end

def build_scope(compiler, node_name)
def build_scope(compiler, _node_name)
compiler.context_overrides[:global_scope]
end

Expand Down
2 changes: 1 addition & 1 deletion lib/rspec-puppet/monkey_patches.rb
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ class Pops::Lookup::ModuleDataProvider
unless mod
raise Puppet::DataBinding::LookupError,
format(_("Environment '%<env>s', cannot find module '%<module_name>s'"), env: env.name,
module_name: module_name)
module_name: module_name)
end

return Pathname.new(mod.hiera_conf_file)
Expand Down
2 changes: 1 addition & 1 deletion spec/classes/hash_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
context 'puppet 4 or greater' do
it {
expect(subject).to contain_structured_data__def('thing').with(
{ 'data' => { 1 => 'uno', 2 => 'dos' } }
{ 'data' => { 1 => 'uno', 2 => 'dos' } }
)
}
end
Expand Down
2 changes: 2 additions & 0 deletions spec/unit/example/function_example_group_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

describe 'when calling with params' do
subject { described_class.new(name, func, overrides) }

it do
expect(func).to receive(:call).with(global_scope, 1, 2).once
subject.call({}, 1, 2)
Expand All @@ -18,6 +19,7 @@

describe 'when executing with params' do
subject { described_class.new(name, func, overrides) }

it do
expect(func).to receive(:call).with(global_scope, 1, 2).once
subject.execute(1, 2)
Expand Down
2 changes: 1 addition & 1 deletion spec/unit/matchers/compile_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,10 @@
let(:expected_error) do
"Evaluation Error: Error while evaluating a Function Call, #{error_detail} on node rspec::puppet::manifestmatchers::compile"
end
let(:error_detail) { 'failure (line: 52, column: 1)' }

before { subject.and_raise_error(expected_error) }

let(:error_detail) { 'failure (line: 52, column: 1)' }
it('matches') { is_expected.to be_matches catalogue }

it {
Expand Down

0 comments on commit a853b96

Please sign in to comment.