Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZeger-Jan van de Weg <git@zjvandeweg.nl>2018-01-31 15:41:14 +0300
committerZeger-Jan van de Weg <git@zjvandeweg.nl>2018-01-31 16:07:47 +0300
commita248e7adf3c11bf9e0231570163930c953a1a8ee (patch)
treecc962a58d74c00615e5fae0a1dd97cb4f51908ea /lib/tasks/flay.rake
parente74e6fcb5eecb7841a412cb0d3e9627556d83eaf (diff)
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
Diffstat (limited to 'lib/tasks/flay.rake')
-rw-r--r--lib/tasks/flay.rake2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/tasks/flay.rake b/lib/tasks/flay.rake
index b1e012e70c5..4b4881cecb8 100644
--- a/lib/tasks/flay.rake
+++ b/lib/tasks/flay.rake
@@ -2,7 +2,7 @@ desc 'Code duplication analyze via flay'
task :flay do
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
exit 1
end