You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
274 B
Ruby

6 years ago
#!/usr/bin/env ruby
def sanity_checks
crates = Dir["**/Cargo.toml"].sort!
crates.each do |x|
if File.readlines(x).grep(/patch.crates-io/).size > 0
puts "#{x} contains patch.crates-io!"
exit(1)
end
end
end
if __FILE__ == $0
sanity_checks()
end