Skip to content
Snippets Groups Projects
Commit 9e211091 authored by Grzegorz Bizon's avatar Grzegorz Bizon
Browse files

Enable Style/EmptyLines cop, remove redundant ones

parent b2273559
Branches
Tags
1 merge request!5013Enable Style/EmptyLines Rubocop cops
Pipeline #
Showing
with 1 addition and 24 deletions
Loading
@@ -193,7 +193,7 @@ Style/EmptyLineBetweenDefs:
Loading
@@ -193,7 +193,7 @@ Style/EmptyLineBetweenDefs:
   
# Don't use several empty lines in a row. # Don't use several empty lines in a row.
Style/EmptyLines: Style/EmptyLines:
Enabled: false Enabled: true
   
# Keep blank lines around access modifiers. # Keep blank lines around access modifiers.
Style/EmptyLinesAroundAccessModifier: Style/EmptyLinesAroundAccessModifier:
Loading
Loading
Loading
@@ -22,7 +22,6 @@ class Admin::HooksController < Admin::ApplicationController
Loading
@@ -22,7 +22,6 @@ class Admin::HooksController < Admin::ApplicationController
redirect_to admin_hooks_path redirect_to admin_hooks_path
end end
   
def test def test
@hook = SystemHook.find(params[:hook_id]) @hook = SystemHook.find(params[:hook_id])
data = { data = {
Loading
Loading
class ConfirmationsController < Devise::ConfirmationsController class ConfirmationsController < Devise::ConfirmationsController
def almost_there def almost_there
flash[:notice] = nil flash[:notice] = nil
render layout: "devise_empty" render layout: "devise_empty"
Loading
Loading
class Import::BaseController < ApplicationController class Import::BaseController < ApplicationController
private private
   
def get_or_create_namespace def get_or_create_namespace
Loading
Loading
Loading
@@ -5,7 +5,6 @@ class Import::FogbugzController < Import::BaseController
Loading
@@ -5,7 +5,6 @@ class Import::FogbugzController < Import::BaseController
rescue_from Fogbugz::AuthenticationException, with: :fogbugz_unauthorized rescue_from Fogbugz::AuthenticationException, with: :fogbugz_unauthorized
   
def new def new
end end
   
def callback def callback
Loading
@@ -22,7 +21,6 @@ class Import::FogbugzController < Import::BaseController
Loading
@@ -22,7 +21,6 @@ class Import::FogbugzController < Import::BaseController
end end
   
def new_user_map def new_user_map
end end
   
def create_user_map def create_user_map
Loading
Loading
Loading
@@ -44,5 +44,4 @@ class Import::GitoriousController < Import::BaseController
Loading
@@ -44,5 +44,4 @@ class Import::GitoriousController < Import::BaseController
def verify_gitorious_import_enabled def verify_gitorious_import_enabled
render_404 unless gitorious_import_enabled? render_404 unless gitorious_import_enabled?
end end
end end
Loading
@@ -3,7 +3,6 @@ class Import::GoogleCodeController < Import::BaseController
Loading
@@ -3,7 +3,6 @@ class Import::GoogleCodeController < Import::BaseController
before_action :user_map, only: [:new_user_map, :create_user_map] before_action :user_map, only: [:new_user_map, :create_user_map]
   
def new def new
end end
   
def callback def callback
Loading
@@ -34,7 +33,6 @@ class Import::GoogleCodeController < Import::BaseController
Loading
@@ -34,7 +33,6 @@ class Import::GoogleCodeController < Import::BaseController
end end
   
def new_user_map def new_user_map
end end
   
def create_user_map def create_user_map
Loading
Loading
Loading
@@ -5,7 +5,6 @@ class InvitesController < ApplicationController
Loading
@@ -5,7 +5,6 @@ class InvitesController < ApplicationController
respond_to :html respond_to :html
   
def show def show
end end
   
def accept def accept
Loading
Loading
Loading
@@ -76,7 +76,6 @@ class Projects::IssuesController < Projects::ApplicationController
Loading
@@ -76,7 +76,6 @@ class Projects::IssuesController < Projects::ApplicationController
render json: @issue.to_json(include: [:milestone, :labels]) render json: @issue.to_json(include: [:milestone, :labels])
end end
end end
end end
   
def create def create
Loading
Loading
Loading
@@ -7,7 +7,6 @@ class Projects::NetworkController < Projects::ApplicationController
Loading
@@ -7,7 +7,6 @@ class Projects::NetworkController < Projects::ApplicationController
before_action :authorize_download_code! before_action :authorize_download_code!
   
def show def show
@url = namespace_project_network_path(@project.namespace, @project, @ref, @options.merge(format: :json)) @url = namespace_project_network_path(@project.namespace, @project, @ref, @options.merge(format: :json))
@commit_url = namespace_project_commit_path(@project.namespace, @project, 'ae45ca32').gsub("ae45ca32", "%s") @commit_url = namespace_project_commit_path(@project.namespace, @project, 'ae45ca32').gsub("ae45ca32", "%s")
   
Loading
Loading
Loading
@@ -124,5 +124,4 @@ class Projects::WikisController < Projects::ApplicationController
Loading
@@ -124,5 +124,4 @@ class Projects::WikisController < Projects::ApplicationController
def wiki_params def wiki_params
params[:wiki].slice(:title, :content, :format, :message) params[:wiki].slice(:title, :content, :format, :message)
end end
end end
module EmailsHelper module EmailsHelper
# Google Actions # Google Actions
# https://developers.google.com/gmail/markup/reference/go-to-action # https://developers.google.com/gmail/markup/reference/go-to-action
def email_action(url) def email_action(url)
Loading
Loading
module IssuablesHelper module IssuablesHelper
def sidebar_gutter_toggle_icon def sidebar_gutter_toggle_icon
sidebar_gutter_collapsed? ? icon('angle-double-left') : icon('angle-double-right') sidebar_gutter_collapsed? ? icon('angle-double-left') : icon('angle-double-right')
end end
Loading
Loading
module SearchHelper module SearchHelper
def search_autocomplete_opts(term) def search_autocomplete_opts(term)
return unless current_user return unless current_user
   
Loading
Loading
Loading
@@ -58,7 +58,6 @@ module Issuable
Loading
@@ -58,7 +58,6 @@ module Issuable
scope :references_project, -> { references(:project) } scope :references_project, -> { references(:project) }
scope :non_archived, -> { join_project.where(projects: { archived: false }) } scope :non_archived, -> { join_project.where(projects: { archived: false }) }
   
delegate :name, delegate :name,
:email, :email,
to: :author, to: :author,
Loading
Loading
Loading
@@ -15,7 +15,6 @@ class ProjectMember < Member
Loading
@@ -15,7 +15,6 @@ class ProjectMember < Member
before_destroy :delete_member_todos before_destroy :delete_member_todos
   
class << self class << self
# Add users to project teams with passed access option # Add users to project teams with passed access option
# #
# access can be an integer representing a access code # access can be an integer representing a access code
Loading
Loading
class BugzillaService < IssueTrackerService class BugzillaService < IssueTrackerService
prop_accessor :title, :description, :project_url, :issues_url, :new_issue_url prop_accessor :title, :description, :project_url, :issues_url, :new_issue_url
   
def title def title
Loading
@@ -21,5 +20,4 @@ class BugzillaService < IssueTrackerService
Loading
@@ -21,5 +20,4 @@ class BugzillaService < IssueTrackerService
def to_param def to_param
'bugzilla' 'bugzilla'
end end
end end
class CustomIssueTrackerService < IssueTrackerService class CustomIssueTrackerService < IssueTrackerService
prop_accessor :title, :description, :project_url, :issues_url, :new_issue_url prop_accessor :title, :description, :project_url, :issues_url, :new_issue_url
   
def title def title
Loading
@@ -31,5 +30,4 @@ class CustomIssueTrackerService < IssueTrackerService
Loading
@@ -31,5 +30,4 @@ class CustomIssueTrackerService < IssueTrackerService
{ type: 'text', name: 'new_issue_url', placeholder: 'New Issue url' } { type: 'text', name: 'new_issue_url', placeholder: 'New Issue url' }
] ]
end end
end end
class DroneCiService < CiService class DroneCiService < CiService
prop_accessor :drone_url, :token, :enable_ssl_verification prop_accessor :drone_url, :token, :enable_ssl_verification
   
validates :drone_url, presence: true, url: true, if: :activated? validates :drone_url, presence: true, url: true, if: :activated?
Loading
Loading
class IssueTrackerService < Service class IssueTrackerService < Service
validates :project_url, :issues_url, :new_issue_url, presence: true, url: true, if: :activated? validates :project_url, :issues_url, :new_issue_url, presence: true, url: true, if: :activated?
   
default_value_for :category, 'issue_tracker' default_value_for :category, 'issue_tracker'
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment