module ERBLint::LinterRegistry

def load_custom_linters(directory = CUSTOM_LINTERS_DIR)

def load_custom_linters(directory = CUSTOM_LINTERS_DIR)
  ruby_files = Dir.glob(File.expand_path(File.join(directory, "**", "*.rb")))
  deprecated_ruby_files = Dir.glob(File.expand_path(File.join(DEPRECATED_CUSTOM_LINTERS_DIR, "**", "*.rb")))
  if deprecated_ruby_files.any?
    deprecation_message = "The '#{DEPRECATED_CUSTOM_LINTERS_DIR}' directory for custom linters is deprecated. " \
      "Please rename it to '#{CUSTOM_LINTERS_DIR}'"
    warn(Rainbow(deprecation_message).yellow)
    ruby_files.concat(deprecated_ruby_files)
  end
  ruby_files.each { |file| require file }
end