Skip to content

Commit

Permalink
(maint) - Fix Layout/EmptyLineAfterGuardClause & Metrics/MethodLength
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanbreen28 committed Feb 14, 2025
1 parent b75d861 commit 87fc0e2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/puppet/provider/dsc_base_provider/dsc_base_provider.rb
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,7 @@ def format_ciminstance(variable_name, class_name, property_hash)
#
# @param resource [Hash] a hash with the information needed to run `Invoke-DscResource`
# @return [String] A string representing the PowerShell definition of the InvokeParams hash
def invoke_params(resource)
def invoke_params(resource) # rubocop:disable Metrics/MethodLength
params = {
Name: resource[:dscmeta_resource_friendly_name],
Method: resource[:dsc_invoke_method],
Expand All @@ -920,6 +920,7 @@ def invoke_params(resource)
# ignore dsc_timeout, since it is only used to specify the powershell command timeout
# and timeout itself is not a parameter to the DSC resource
next if property_name == :dsc_timeout

# strip dsc_ from the beginning of the property name declaration
name = property_name.to_s.gsub(/^dsc_/, '').to_sym
params[:Property][name] = case property_hash[:mof_type]
Expand Down

0 comments on commit 87fc0e2

Please sign in to comment.