2015-11-11 10:29:00 -05:00
|
|
|
desc 'Code duplication analyze via flay'
|
|
|
|
task :flay do
|
2018-06-20 12:31:56 -04:00
|
|
|
output = `bundle exec flay --mass 35 app/ lib/gitlab/ ee/ 2> #{File::NULL}`
|
2015-11-11 10:29:00 -05:00
|
|
|
|
2018-01-31 07:41:14 -05:00
|
|
|
if output.include?("Similar code found") || output.include?("IDENTICAL code found")
|
2015-11-11 10:29:00 -05:00
|
|
|
puts output
|
|
|
|
exit 1
|
|
|
|
end
|
|
|
|
end
|