leaked-globals: More accurately extract checked function names

This commit is contained in:
Nobuyoshi Nakada 2024-02-01 20:44:12 +09:00
parent 7b93e65e9f
commit f22bec79fe
No known key found for this signature in database
GPG Key ID: 3582D74E1FEE4465

View File

@ -47,7 +47,9 @@ if platform and !platform.empty?
end
missing = File.dirname(config) + "/missing/"
ARGV.reject! do |n|
unless (src = Dir.glob(missing + File.basename(n, ".*") + ".[cS]")).empty?
base = File.basename(n, ".*")
next true if REPLACE.include?(base)
unless (src = Dir.glob(missing + base + ".[cS]")).empty?
puts "Ignore #{col.skip(n)} because of #{src.map {|s| File.basename(s)}.join(', ')} under missing"
true
end