<commit_before># frozen_string_literal: true

require 'shellwords'
#
# docker_plugin_remove_flags.rb
#
module Puppet::Parser::Functions
  # Transforms a hash into a string of docker plugin remove flags
  newfunction(:docker_plugin_enable_flags, type: :rvalue) do |args|
    opts = args[0] || {}
    flags = []
    flags << '--force' if opts['force_remove'] == true
    if opts['plugin_alias'] && opts['plugin_alias'].to_s != 'undef'
      flags << "'#{opts['plugin_alias']}'"
    else
      flags << "'#{opts['plugin_name']}'" if opts['plugin_name'] && opts['plugin_name'].to_s != 'undef'
    end
    flags.flatten.join(' ')
  end
end<commit_msg>Fixed RuboCop linter warning<commit_after># frozen_string_literal: true

require 'shellwords'
#
# docker_plugin_remove_flags.rb
#
module Puppet::Parser::Functions
  # Transforms a hash into a string of docker plugin remove flags
  newfunction(:docker_plugin_enable_flags, type: :rvalue) do |args|
    opts = args[0] || {}
    flags = []
    flags << '--force' if opts['force_remove'] == true
    if opts['plugin_alias'] && opts['plugin_alias'].to_s != 'undef'
      flags << "'#{opts['plugin_alias']}'"
    elsif opts['plugin_name'] && opts['plugin_name'].to_s != 'undef'
      flags << "'#{opts['plugin_name']}'"
    end
    flags.flatten.join(' ')
  end
end
{'fraction_non_alphanumeric': 0.16551724137931034, 'fraction_numerical': 0.0015325670498084292, 'mean_word_length': 4.374485596707819, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1690045', 'n_tokens_mistral': 433, 'n_tokens_neox': 430, 'n_words': 99}