diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2018-08-27 18:31:01 +0300 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2018-09-11 18:32:00 +0300 |
commit | 2039c8280db1646845c33d6c5a74e5f23ca6f4de (patch) | |
tree | e2b3cd3012d9711cda7c6afb962ae4228d59521a /app/controllers/admin/runners_controller.rb | |
parent | 91c40973dc620430b173ea2df968587d2a708dff (diff) |
Disable existing offenses for the CodeReuse cops
This whitelists all existing offenses for the various CodeReuse cops, of
which most are triggered by the CodeReuse/ActiveRecord cop.
Diffstat (limited to 'app/controllers/admin/runners_controller.rb')
-rw-r--r-- | app/controllers/admin/runners_controller.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/controllers/admin/runners_controller.rb b/app/controllers/admin/runners_controller.rb index 6c76c55a9d4..090149fc1e2 100644 --- a/app/controllers/admin/runners_controller.rb +++ b/app/controllers/admin/runners_controller.rb @@ -1,6 +1,7 @@ class Admin::RunnersController < Admin::ApplicationController before_action :runner, except: :index + # rubocop: disable CodeReuse/ActiveRecord def index sort = params[:sort] == 'contacted_asc' ? { contacted_at: :asc } : { id: :desc } @runners = Ci::Runner.order(sort) @@ -8,6 +9,7 @@ class Admin::RunnersController < Admin::ApplicationController @runners = @runners.page(params[:page]).per(30) @active_runners_cnt = Ci::Runner.online.count end + # rubocop: enable CodeReuse/ActiveRecord def show assign_builds_and_projects @@ -57,6 +59,7 @@ class Admin::RunnersController < Admin::ApplicationController params.require(:runner).permit(Ci::Runner::FORM_EDITABLE) end + # rubocop: disable CodeReuse/ActiveRecord def assign_builds_and_projects @builds = runner.builds.order('id DESC').first(30) @projects = @@ -69,4 +72,5 @@ class Admin::RunnersController < Admin::ApplicationController @projects = @projects.where.not(id: runner.projects.select(:id)) if runner.projects.any? @projects = @projects.page(params[:page]).per(30) end + # rubocop: enable CodeReuse/ActiveRecord end |