Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 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 --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
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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'

2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
4 changes: 2 additions & 2 deletions lib/puppet/pops/issues.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/puppet/resource.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading