Commit 5e05669a authored by Rémy Coutable's avatar Rémy Coutable

Make Flay inspect ee/ as well and ignore db files

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent b9edd4e8
......@@ -15,3 +15,7 @@ app/models/project_services/packagist_service.rb
lib/gitlab/background_migration/normalize_ldap_extern_uids_range.rb
lib/gitlab/background_migration/*
app/models/project_services/kubernetes_service.rb
ee/db/**/*
ee/app/serializers/ee/merge_request_widget_entity.rb
ee/lib/ee/gitlab/ldap/sync/admin_users.rb
module EE
module API
module Helpers
extend ::Gitlab::Utils::Override
override :current_user
def current_user
strong_memoize(:current_user) do
user = super
......
......@@ -2,6 +2,9 @@ module EE
module API
module Helpers
module Runner
extend ::Gitlab::Utils::Override
override :authenticate_job!
def authenticate_job!
id = params[:id]
......@@ -13,6 +16,7 @@ module EE
super
end
override :current_runner
def current_runner
token = params[:token]
......
module EE
module Ci
module API
module Helpers
def authenticate_build!
id = params[:id]
if id
::Gitlab::Database::LoadBalancing::RackMiddleware
.stick_or_unstick(env, :build, id)
end
super
end
def current_runner
token = params[:token]
if token
::Gitlab::Database::LoadBalancing::RackMiddleware
.stick_or_unstick(env, :runner, token)
end
super
end
end
end
end
end
desc 'Code duplication analyze via flay'
task :flay do
output = `bundle exec flay --mass 35 app/ lib/gitlab/ 2> #{File::NULL}`
output = `bundle exec flay --mass 35 app/ lib/gitlab/ ee/ 2> #{File::NULL}`
if output.include?("Similar code found") || output.include?("IDENTICAL code found")
puts output
......
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