File tree Expand file tree Collapse file tree 2 files changed +2
-10
lines changed
lib/puppet_x/puppetlabs/dsc_lite Expand file tree Collapse file tree 2 files changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -211,14 +211,6 @@ Style/CaseLikeIf:
211211 Exclude :
212212 - ' spec/spec_helper_acceptance_local.rb'
213213
214- # Offense count: 2
215- # This cop supports safe autocorrection (--autocorrect).
216- # Configuration parameters: AllowedMethods, AllowedPatterns.
217- # AllowedMethods: ==, equal?, eql?
218- Style/ClassEqualityComparison :
219- Exclude :
220- - ' lib/puppet_x/puppetlabs/dsc_lite/powershell_hash_formatter.rb'
221-
222214# Offense count: 2
223215Style/MixinUsage :
224216 Exclude :
Original file line number Diff line number Diff line change @@ -12,9 +12,9 @@ class PowerShellHashFormatter
1212 #
1313 # @return [Object] Formatted value.
1414 def self . format ( dsc_value )
15- if dsc_value . class . name == ' Hash'
15+ if dsc_value . instance_of? ( :: Hash )
1616 format_hash ( dsc_value )
17- elsif dsc_value . class . name == ' Puppet::Pops::Types::PSensitiveType::Sensitive'
17+ elsif dsc_value . instance_of? ( :: Puppet ::Pops ::Types ::PSensitiveType ::Sensitive )
1818 "'#{ escape_quotes ( dsc_value . unwrap ) } ' # PuppetSensitive"
1919 else
2020 Pwsh ::Util . format_powershell_value ( dsc_value )
You can’t perform that action at this time.
0 commit comments