From b343a976773f4b22469640fea801a00bd76595f4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 23 Mar 2026 13:11:48 +0000 Subject: [PATCH 1/2] Update rubocop requirement from ~> 1.81.6 to ~> 1.86.1 Updates the requirements on [rubocop](https://github.com/rubocop/rubocop) to permit the latest version. - [Release notes](https://github.com/rubocop/rubocop/releases) - [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md) - [Commits](https://github.com/rubocop/rubocop/compare/v1.81.6...v1.86.0) --- updated-dependencies: - dependency-name: rubocop dependency-version: 1.86.0 dependency-type: direct:development ... Signed-off-by: dependabot[bot] --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 33e92f0b56..9e81907021 100644 --- a/Gemfile +++ b/Gemfile @@ -56,7 +56,7 @@ group(:test) do gem 'webrick', '~> 1.7', require: false gem 'yard', require: false - gem 'rubocop', '~> 1.81.6', require: false, platforms: [:ruby] + gem 'rubocop', '~> 1.86.1', require: false, platforms: [:ruby] gem 'rubocop-i18n', '~> 3.0', require: false, platforms: [:ruby] gem 'rubocop-performance', '~> 1.0', require: false, platforms: [:ruby] gem 'rubocop-rake', '~> 0.6', require: false, platforms: [:ruby] From 7856c87a341f19e6b927291ae56bec46dfd5647a Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Thu, 9 Apr 2026 14:36:58 +0200 Subject: [PATCH 2/2] rubocop: autofix Signed-off-by: Tim Meusel --- .rubocop_todo.yml | 24 ++++++++++++------------ lib/puppet/pops/issues.rb | 4 ++-- lib/puppet/resource.rb | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index af4ff2514a..c228413167 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -1,6 +1,6 @@ # This configuration was generated by # `rubocop --auto-gen-config --no-offense-counts --no-auto-gen-timestamp` -# using RuboCop version 1.80.0. +# using RuboCop version 1.86.1. # 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 @@ -138,7 +138,8 @@ Lint/UnusedMethodArgument: # Configuration parameters: CheckForMethodsWithNoSideEffects. Lint/Void: Exclude: - - 'lib/puppet/type/schedule.rb' + - 'lib/puppet/pops/loader/loader_paths.rb' + - 'lib/puppet/util/multi_match.rb' # This cop supports unsafe autocorrection (--autocorrect-all). Performance/Count: @@ -149,6 +150,12 @@ Performance/Count: - 'lib/puppet/graph/relationship_graph.rb' - 'lib/puppet/provider.rb' +# This cop supports safe autocorrection (--autocorrect). +# Configuration parameters: IncludeActiveSupportAliases. +Performance/DoubleStartEndWith: + Exclude: + - 'lib/puppet/ssl/certificate_request.rb' + # This cop supports unsafe autocorrection (--autocorrect-all). Performance/InefficientHashSearch: Exclude: @@ -311,10 +318,8 @@ Style/DoubleNegation: - 'lib/puppet/parser/functions/fqdn_rand.rb' - 'lib/puppet/pops/evaluator/evaluator_impl.rb' - 'lib/puppet/pops/issue_reporter.rb' - - 'lib/puppet/pops/types/p_runtime_type.rb' - 'lib/puppet/provider/package/apt.rb' - 'lib/puppet/type.rb' - - 'lib/puppet/util/feature.rb' # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyle, AllowComments. @@ -538,7 +543,7 @@ Style/OptionalBooleanParameter: # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: AllowedMethods. -# AllowedMethods: nonzero? +# AllowedMethods: infinite?, nonzero? Style/RedundantCondition: Exclude: - 'lib/puppet/face/epp.rb' @@ -667,7 +672,7 @@ Style/TernaryParentheses: # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: EnforcedStyleForMultiline. -# SupportedStylesForMultiline: comma, consistent_comma, no_comma +# SupportedStylesForMultiline: comma, consistent_comma, diff_comma, no_comma Style/TrailingCommaInArguments: Exclude: - 'lib/puppet/util/windows/user.rb' @@ -725,12 +730,7 @@ Style/ZeroLengthPredicate: Enabled: false # This cop supports safe autocorrection (--autocorrect). -# Configuration parameters: AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, IgnoreCopDirectives, AllowedPatterns, SplitStrings. +# Configuration parameters: AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, AllowRBSInlineAnnotation, AllowCopDirectives, AllowedPatterns, SplitStrings. # URISchemes: http, https Layout/LineLength: Max: 582 - -Performance/DoubleStartEndWith: - Exclude: - - 'lib/puppet/ssl/certificate_request.rb' - diff --git a/lib/puppet/pops/issues.rb b/lib/puppet/pops/issues.rb index e04315d245..4f5b0e0bc7 100644 --- a/lib/puppet/pops/issues.rb +++ b/lib/puppet/pops/issues.rb @@ -26,7 +26,7 @@ class Issue attr_writer :demotable # Configures the Issue with required arguments (bound by occurrence), and a block producing a message. - def initialize issue_code, *args, &block + def initialize(issue_code, *args, &block) @issue_code = issue_code @message_block = block @arg_names = args @@ -62,7 +62,7 @@ def format(hash = {}) # @api private # class MessageData - def initialize *argnames + def initialize(*argnames) singleton = class << self; self end argnames.each do |name| singleton.send(:define_method, name) do diff --git a/lib/puppet/resource.rb b/lib/puppet/resource.rb index 41d5f842b4..16090386b4 100644 --- a/lib/puppet/resource.rb +++ b/lib/puppet/resource.rb @@ -590,7 +590,7 @@ def self.extract_type_and_title(argtype, argtitle) argtype =~ /^([^\[\]]+)\[(.+)\]$/m then [::Regexp.last_match(1), ::Regexp.last_match(2)] elsif argtitle then [argtype, argtitle] elsif argtype.is_a?(Puppet::Type) then [argtype.class.name, argtype.title] - else raise ArgumentError, _("No title provided and %{type} is not a valid resource reference") % { type: argtype.inspect } # rubocop:disable Lint/ElseLayout + else raise ArgumentError, _("No title provided and %{type} is not a valid resource reference") % { type: argtype.inspect } end end private_class_method :extract_type_and_title