Commit 7dbdc0ab authored by Lin Jen-Shin's avatar Lin Jen-Shin

Make it more clear and put heavy condi in the last

parent 842df676
......@@ -16,11 +16,11 @@ offenses = updated_numstat.select do |file, updated_delta|
more_lines =
current_delta &&
updated_delta > current_delta &&
WHITELIST.all? { |pattern| !Dir.glob(pattern).include?(file) }
# Don't complain if we're just adding 1 or 2 more lines, which could be
# `prepend EE::Module` and a blank line that we want.
!(current_delta == 0 && updated_delta <= 2)
# Don't complain if we're just adding 1 or 2 more lines, which could be
# `prepend EE::Module` and a blank line that we want.
more_lines && !(current_delta == 0 && updated_delta <= 2)
more_lines && !WHITELIST.any? { |pattern| Dir.glob(pattern).include?(file) }
end
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