Commit a248e7ad authored by Zeger-Jan van de Weg's avatar Zeger-Jan van de Weg

Fix flay not detecting identical code

Previously the script checked only for 'Similar code', but flay will
tell users when IDENTICAL code is detected too. This should create a
commit will create a failing pipeline, and to check that it does this
commit is pushed.

Fixes #42628
parent e74e6fcb
...@@ -2,7 +2,7 @@ desc 'Code duplication analyze via flay' ...@@ -2,7 +2,7 @@ desc 'Code duplication analyze via flay'
task :flay do task :flay do
output = `bundle exec flay --mass 35 app/ lib/gitlab/ 2> #{File::NULL}` output = `bundle exec flay --mass 35 app/ lib/gitlab/ 2> #{File::NULL}`
if output.include? "Similar code found" if output.include?("Similar code found") || output.include?("IDENTICAL code found")
puts output puts output
exit 1 exit 1
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