diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index ac8d92a..51a8dd6 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `rubocop --auto-gen-config` -# on 2024-02-07 19:46:27 UTC using RuboCop version 1.60.2. +# on 2024-03-08 12:59:05 UTC using RuboCop version 1.61.0. # 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 @@ -31,6 +31,7 @@ Lint/SuppressedException: # Offense count: 1 # This cop supports unsafe autocorrection (--autocorrect-all). +# Configuration parameters: AutoCorrect. Lint/UselessAssignment: Exclude: - 'lib/puppet-syntax/templates.rb' @@ -73,7 +74,7 @@ RSpec/DescribeClass: # Offense count: 19 # This cop supports unsafe autocorrection (--autocorrect-all). -# Configuration parameters: SkipBlocks, EnforcedStyle. +# Configuration parameters: SkipBlocks, EnforcedStyle, OnlyStaticConstants. # SupportedStyles: described_class, explicit RSpec/DescribedClass: Exclude: @@ -139,13 +140,12 @@ Rake/Desc: Exclude: - 'Rakefile' -# Offense count: 2 +# Offense count: 1 # This cop supports unsafe autocorrection (--autocorrect-all). # Configuration parameters: EnforcedStyle. # SupportedStyles: always, conditionals Style/AndOr: Exclude: - - 'lib/puppet-syntax/manifests.rb' - 'lib/puppet-syntax/templates.rb' # Offense count: 1 @@ -244,7 +244,7 @@ Style/SymbolProc: - 'lib/puppet-syntax/manifests.rb' - 'lib/puppet-syntax/templates.rb' -# Offense count: 3 +# Offense count: 2 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns. # URISchemes: http, https diff --git a/lib/puppet-syntax/manifests.rb b/lib/puppet-syntax/manifests.rb index 1b22cce..d277b8c 100644 --- a/lib/puppet-syntax/manifests.rb +++ b/lib/puppet-syntax/manifests.rb @@ -61,7 +61,7 @@ def check(filelist) private def validate_manifest(file) - Puppet[:tasks] = true if Puppet::Util::Package.versioncmp(Puppet.version, '5.4.0') >= 0 and file.match(%r{.*plans/.*\.pp$}) + Puppet[:tasks] = true if %r{.*plans/.*\.pp$}.match?(file) Puppet::Face[:parser, :current].validate(file) end end