Add missing filetypes for systemd

This commit is contained in:
Adam Stankiewicz
2020-09-28 01:23:00 +02:00
parent 312e95099d
commit b7598ff0c5
4 changed files with 26 additions and 2 deletions

View File

@@ -738,8 +738,15 @@ def show_warnings(all_filetypes, expected_filetypes)
[f["extensions"], f["ignored_extensions"]].compact.flatten.map { |e| "*." + e }
end
all_handled_regexps = Hash[all_handled.group_by { |a, b| a }.map { |a, b| [a, b[1]] }.map do |a, b|
[a, Regexp.union(b.map { |x| Regexp.escape(x).gsub('\\*', '.*') })]
end]
for name, e in all_expected - all_handled
if e.match?(/\/\*\.[^\/]+$/) && all_handled.include?([name, e.split('/').last])
if e.match?(/\/\*?\.[^\/]+$/) && all_handled.include?([name, e.split('/').last.gsub('*', '')])
next
end
if e.include?('*') && all_handled_regexps[name].match?(e)
next
end
puts "Missing for #{name}: #{e}"