samvera-deprecated / sufia

[DEPRECATED] Sufia: a fully featured, flexible Samvera repository front-end.
http://sufia.io/
Other
111 stars 78 forks source link

Removing an exclusion for a non-existent file #3152

Closed jeremyf closed 7 years ago

jeremyf commented 7 years ago

Using the following script, found several files that were not referenced.

require 'psych'
['.rubocop.yml', '.rubocop_todo.yml'].each do |filename|
yaml = Psych.load_file(filename)

def read(node)
  if node.is_a?(Hash)
    node.each_pair do |key, value|
      read(value)
    end
  elsif node.is_a?(Array)
    node.each do |value|
      read(value)
    end
  elsif node.is_a?(String)
    return unless node =~ /.rb\Z/
    return if node =~ /\*/
    return if File.exist?(node)
    puts node
  end
end
read(yaml)

@projecthydra/sufia-code-reviewers