Commit 1fede4d4 authored by Aleksandr Soborov's avatar Aleksandr Soborov

Allow the EE file checks to glob and whitelist dotfiles

Added File::FNM_DOTMATCH flag to glob functions
to allow them to find dotfiles in whitelisted directories.
parent 7659c1f9
...@@ -28,7 +28,7 @@ new_ee_specific_files_not_at_the_ee_top_level = ...@@ -28,7 +28,7 @@ new_ee_specific_files_not_at_the_ee_top_level =
status = 0 status = 0
new_ee_specific_files_not_at_the_ee_top_level.each do |file| new_ee_specific_files_not_at_the_ee_top_level.each do |file|
next if WHITELIST.any? { |pattern| Dir.glob(pattern).include?(file) } next if WHITELIST.any? { |pattern| Dir.glob(pattern, File::FNM_DOTMATCH).include?(file) }
puts puts
puts "* 💥 #{file} is EE-specific and should be moved to ee/#{file}: 💥" puts "* 💥 #{file} is EE-specific and should be moved to ee/#{file}: 💥"
......
...@@ -24,7 +24,7 @@ offenses = updated_numstat.select do |file, updated_delta| ...@@ -24,7 +24,7 @@ offenses = updated_numstat.select do |file, updated_delta|
more_lines && more_lines &&
allow_prepend_line && allow_prepend_line &&
!WHITELIST.any? { |pattern| Dir.glob(pattern).include?(file) } !WHITELIST.any? { |pattern| Dir.glob(pattern, File::FNM_DOTMATCH).include?(file) }
end end
if offenses.empty? if offenses.empty?
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment