From ab48c7e5006e6d3bbd47fbb58f16b0f6e7449a24 Mon Sep 17 00:00:00 2001 From: Gavin Didrichsen Date: Mon, 17 Jun 2024 09:57:20 +0100 Subject: [PATCH] Autocorrect Style/SuperArguments Signed-off-by: Gavin Didrichsen --- .rubocop_todo.yml | 9 +++++---- lib/puppet/resource_api.rb | 2 +- lib/puppet/resource_api/type_definition.rb | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 5a6b14e0..42f2ee62 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -217,9 +217,10 @@ Style/RedundantParentheses: # Exclude: # - 'contrib/pre-commit' +# HACK for jruby # Offense count: 2 # This cop supports safe autocorrection (--autocorrect). -Style/SuperArguments: - Exclude: - - 'lib/puppet/resource_api.rb' - - 'lib/puppet/resource_api/type_definition.rb' +# Style/SuperArguments: +# Exclude: +# - 'lib/puppet/resource_api.rb' +# - 'lib/puppet/resource_api/type_definition.rb' diff --git a/lib/puppet/resource_api.rb b/lib/puppet/resource_api.rb index 9fe8591f..19c74180 100644 --- a/lib/puppet/resource_api.rb +++ b/lib/puppet/resource_api.rb @@ -104,7 +104,7 @@ def initialize(attributes) attributes[:title] = @title if attributes[:title].nil? && !type_definition.namevars.empty? end - super(attributes) + super end def name diff --git a/lib/puppet/resource_api/type_definition.rb b/lib/puppet/resource_api/type_definition.rb index eb9b5d6a..98afa824 100644 --- a/lib/puppet/resource_api/type_definition.rb +++ b/lib/puppet/resource_api/type_definition.rb @@ -25,7 +25,7 @@ def title_patterns end def validate_schema(definition, attr_key) - super(definition, attr_key) + super %i[title provider alias audit before consume export loglevel noop notify require schedule stage subscribe tag].each do |name| raise Puppet::DevError, format('must not define an attribute called `%s`', name: name.inspect) if definition[attr_key].key? name end