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:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-11-11 18:29:00 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-11-11 18:29:00 +0300
commit98c954ee815823f27cf021b34684c2c3d5bb0917 (patch)
treed131262b7133c7ac5b86c70e84c2a5282ab393bb /lib/tasks/flay.rake
parent6748dd2fd0b2cf694661e910c6c1bb6ac2be69a1 (diff)
Add flay: tool to find duplicate code
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'lib/tasks/flay.rake')
-rw-r--r--lib/tasks/flay.rake9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/tasks/flay.rake b/lib/tasks/flay.rake
new file mode 100644
index 00000000000..5efffc2cdac
--- /dev/null
+++ b/lib/tasks/flay.rake
@@ -0,0 +1,9 @@
+desc 'Code duplication analyze via flay'
+task :flay do
+ output = %x(bundle exec flay app/ lib/gitlab/)
+
+ if output.include? "Similar code found"
+ puts output
+ exit 1
+ end
+end