diff --git a/danger/tailwindcss/Dangerfile b/danger/tailwindcss/Dangerfile index 2975d373abdcd3e832e1261581a3a87a5319f995..f32e6d0d7cac15f2174e529e4e3115449f4c86eb 100644 --- a/danger/tailwindcss/Dangerfile +++ b/danger/tailwindcss/Dangerfile @@ -46,6 +46,11 @@ module Danger def files_with_interpolated_utils(files, pattern) files.select do |file| diff = @git.diff_for_file(file) + + # When a file is just moved around it appears in the changed files list + # but the diff is empty so we are skipping it. + next if diff.nil? + diff.patch.each_line.any? do |line| line.start_with?('+') && line.match?(pattern) end