From ec88e6244281f5f4bab63d898fe6863e3d85acd9 Mon Sep 17 00:00:00 2001 From: Ewoud Kohl van Wijngaarden Date: Mon, 28 Aug 2023 15:42:00 +0200 Subject: [PATCH] Remove unused parser deprecation function There is already a modern function API definition for the deprecation function, so this ends up being unused. Fixes: 72d236595135 ("(MODULES-3529)add deprecation function") --- lib/puppet/parser/functions/deprecation.rb | 25 ---------------------- 1 file changed, 25 deletions(-) delete mode 100644 lib/puppet/parser/functions/deprecation.rb diff --git a/lib/puppet/parser/functions/deprecation.rb b/lib/puppet/parser/functions/deprecation.rb deleted file mode 100644 index 503edc98d..000000000 --- a/lib/puppet/parser/functions/deprecation.rb +++ /dev/null @@ -1,25 +0,0 @@ -# frozen_string_literal: true - -# -# deprecation.rb -# -module Puppet::Parser::Functions - newfunction(:deprecation, doc: <<-DOC - @summary - Function to print deprecation warnings (this is the 3.X version of it). - - The uniqueness key - can appear once. The msg is the message text including any positional - information that is formatted by the user/caller of the method.). - - @return [String] - return deprecation warnings - DOC - ) do |arguments| - raise(Puppet::ParseError, "deprecation: Wrong number of arguments given (#{arguments.size} for 2)") unless arguments.size == 2 - - key = arguments[0] - message = arguments[1] - - warning("deprecation. #{key}. #{message}") if ENV['STDLIB_LOG_DEPRECATIONS'] == 'true' - end -end