debian-mirror-gitlab/lib/tasks/flay.rake

10 lines
253 B
Ruby
Raw Normal View History

2015-11-26 14:37:03 +05:30
desc 'Code duplication analyze via flay'
task :flay do
2018-03-17 18:26:18 +05:30
output = `bundle exec flay --mass 35 app/ lib/gitlab/ 2> #{File::NULL}`
2015-11-26 14:37:03 +05:30
2018-03-17 18:26:18 +05:30
if output.include?("Similar code found") || output.include?("IDENTICAL code found")
2015-11-26 14:37:03 +05:30
puts output
exit 1
end
end