Commit 36b26a86 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'disallow-extra-2-lines-because-prepend_if_ee' into 'master'

Remove allowing extra 2 lines since prepend_if_ee

See merge request gitlab-org/gitlab-ee!16377
parents 5091611b 00649134
...@@ -15,15 +15,7 @@ offenses = updated_numstat.select do |file, updated_delta| ...@@ -15,15 +15,7 @@ offenses = updated_numstat.select do |file, updated_delta|
more_lines = updated_delta > current_delta more_lines = updated_delta > current_delta
allow_prepend_line =
# 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) ||
# We only allow Ruby files to have prepend line
!file.end_with?('.rb')
more_lines && more_lines &&
allow_prepend_line &&
!WHITELIST.any? { |pattern| Dir.glob(pattern, File::FNM_DOTMATCH).include?(file) } !WHITELIST.any? { |pattern| Dir.glob(pattern, File::FNM_DOTMATCH).include?(file) }
end end
......
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