Skip to content
Snippets Groups Projects
Commit 206953a4 authored by Douwe Maan's avatar Douwe Maan
Browse files

Prefer leading style for Style/DotPosition

parent f72a6560
No related branches found
No related tags found
No related merge requests found
Showing
with 64 additions and 64 deletions
Loading
Loading
@@ -138,7 +138,7 @@ Style/Documentation:
 
Style/DotPosition:
Enabled: true
EnforcedStyle: trailing
EnforcedStyle: leading
 
# Align elses and elsifs correctly.
Style/ElseAlignment:
Loading
Loading
Loading
Loading
@@ -5,9 +5,9 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController
end
 
def update
successful = ApplicationSettings::UpdateService.
new(@application_setting, current_user, application_setting_params).
execute
successful = ApplicationSettings::UpdateService
.new(@application_setting, current_user, application_setting_params)
.execute
 
if successful
redirect_to admin_application_settings_path,
Loading
Loading
Loading
Loading
@@ -83,8 +83,8 @@ module CreatesCommit
def merge_request_exists?
return @merge_request if defined?(@merge_request)
 
@merge_request = MergeRequestsFinder.new(current_user, project_id: @mr_target_project.id).execute.opened.
find_by(source_branch: @mr_source_branch, target_branch: @mr_target_branch, source_project_id: @mr_source_project)
@merge_request = MergeRequestsFinder.new(current_user, project_id: @mr_target_project.id).execute.opened
.find_by(source_branch: @mr_source_branch, target_branch: @mr_target_branch, source_project_id: @mr_source_project)
end
 
def different_project?
Loading
Loading
Loading
Loading
@@ -5,9 +5,9 @@ module IssuesAction
def issues
@label = issues_finder.labels.first
 
@issues = issues_collection.
non_archived.
page(params[:page])
@issues = issues_collection
.non_archived
.page(params[:page])
 
@collection_type = "Issue"
@issuable_meta_data = issuable_meta_data(@issues, @collection_type)
Loading
Loading
Loading
Loading
@@ -15,8 +15,8 @@ module MembershipActions
end
 
def leave
member = Members::DestroyService.new(membershipable, current_user, user_id: current_user.id).
execute(:all)
member = Members::DestroyService.new(membershipable, current_user, user_id: current_user.id)
.execute(:all)
 
source_type = membershipable.class.to_s.humanize(capitalize: false)
notice =
Loading
Loading
Loading
Loading
@@ -5,8 +5,8 @@ module MergeRequestsAction
def merge_requests
@label = merge_requests_finder.labels.first
 
@merge_requests = merge_requests_collection.
page(params[:page])
@merge_requests = merge_requests_collection
.page(params[:page])
 
@collection_type = "MergeRequest"
@issuable_meta_data = issuable_meta_data(@merge_requests, @collection_type)
Loading
Loading
Loading
Loading
@@ -29,9 +29,9 @@ class Import::BitbucketController < Import::BaseController
end
 
def jobs
render json: current_user.created_projects.
where(import_type: 'bitbucket').
to_json(only: [:id, :import_status])
render json: current_user.created_projects
.where(import_type: 'bitbucket')
.to_json(only: [:id, :import_status])
end
 
def create
Loading
Loading
Loading
Loading
@@ -11,8 +11,8 @@ class JwtController < ApplicationController
service = SERVICES[params[:service]]
return head :not_found unless service
 
result = service.new(@authentication_result.project, @authentication_result.actor, auth_params).
execute(authentication_abilities: @authentication_result.authentication_abilities)
result = service.new(@authentication_result.project, @authentication_result.actor, auth_params)
.execute(authentication_abilities: @authentication_result.authentication_abilities)
 
render json: result, status: result[:http_status]
end
Loading
Loading
Loading
Loading
@@ -144,7 +144,7 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController
end
 
def log_audit_event(user, options = {})
AuditEventService.new(user, user, options).
for_authentication.security_event
AuditEventService.new(user, user, options)
.for_authentication.security_event
end
end
Loading
Loading
@@ -41,9 +41,9 @@ class ProfilesController < Profiles::ApplicationController
end
 
def audit_log
@events = AuditEvent.where(entity_type: "User", entity_id: current_user.id).
order("created_at DESC").
page(params[:page])
@events = AuditEvent.where(entity_type: "User", entity_id: current_user.id)
.order("created_at DESC")
.page(params[:page])
end
 
def update_username
Loading
Loading
Loading
Loading
@@ -4,15 +4,15 @@ class Projects::BadgesController < Projects::ApplicationController
before_action :no_cache_headers, except: [:index]
 
def build
build_status = Gitlab::Badge::Build::Status.
new(project, params[:ref])
build_status = Gitlab::Badge::Build::Status
.new(project, params[:ref])
 
render_badge build_status
end
 
def coverage
coverage_report = Gitlab::Badge::Coverage::Report.
new(project, params[:ref], params[:job])
coverage_report = Gitlab::Badge::Coverage::Report
.new(project, params[:ref], params[:job])
 
render_badge coverage_report
end
Loading
Loading
Loading
Loading
@@ -164,7 +164,7 @@ class Projects::BlobController < Projects::ApplicationController
end
 
def set_last_commit_sha
@last_commit_sha = Gitlab::Git::Commit.
last_for_path(@repository, @ref, @path).sha
@last_commit_sha = Gitlab::Git::Commit
.last_for_path(@repository, @ref, @path).sha
end
end
Loading
Loading
@@ -40,10 +40,10 @@ module Projects
 
def issue
@issue ||=
IssuesFinder.new(current_user, project_id: project.id).
execute.
where(iid: params[:id]).
first!
IssuesFinder.new(current_user, project_id: project.id)
.execute
.where(iid: params[:id])
.first!
end
 
def authorize_read_issue!
Loading
Loading
Loading
Loading
@@ -32,8 +32,8 @@ class Projects::BranchesController < Projects::ApplicationController
branch_name = sanitize(strip_tags(params[:branch_name]))
branch_name = Addressable::URI.unescape(branch_name)
 
result = CreateBranchService.new(project, current_user).
execute(branch_name, ref)
result = CreateBranchService.new(project, current_user)
.execute(branch_name, ref)
 
if params[:issue_iid]
issue = IssuesFinder.new(current_user, project_id: @project.id).find_by(iid: params[:issue_iid])
Loading
Loading
Loading
Loading
@@ -48,8 +48,8 @@ class Projects::BuildsController < Projects::ApplicationController
respond_to do |format|
format.json do
state = params[:state].presence
render json: @build.trace_with_state(state: state).
merge!(id: @build.id, status: @build.status)
render json: @build.trace_with_state(state: state)
.merge!(id: @build.id, status: @build.status)
end
end
end
Loading
Loading
Loading
Loading
@@ -35,9 +35,9 @@ class Projects::CommitController < Projects::ApplicationController
respond_to do |format|
format.html
format.json do
render json: PipelineSerializer.
new(project: @project, user: @current_user).
represent(@pipelines)
render json: PipelineSerializer
.new(project: @project, user: @current_user)
.represent(@pipelines)
end
end
end
Loading
Loading
Loading
Loading
@@ -18,11 +18,11 @@ class Projects::CommitsController < Projects::ApplicationController
@repository.commits(@ref, path: @path, limit: @limit, offset: @offset)
end
 
@note_counts = project.notes.where(commit_id: @commits.map(&:id)).
group(:commit_id).count
@note_counts = project.notes.where(commit_id: @commits.map(&:id))
.group(:commit_id).count
 
@merge_request = MergeRequestsFinder.new(current_user, project_id: @project.id).execute.opened.
find_by(source_project: @project, source_branch: @ref, target_branch: @repository.root_ref)
@merge_request = MergeRequestsFinder.new(current_user, project_id: @project.id).execute.opened
.find_by(source_project: @project, source_branch: @ref, target_branch: @repository.root_ref)
 
respond_to do |format|
format.html
Loading
Loading
Loading
Loading
@@ -46,8 +46,8 @@ class Projects::CompareController < Projects::ApplicationController
end
 
def define_diff_vars
@compare = CompareService.new(@project, @head_ref).
execute(@project, @start_ref)
@compare = CompareService.new(@project, @head_ref)
.execute(@project, @start_ref)
 
if @compare
@commits = @compare.commits
Loading
Loading
@@ -66,7 +66,7 @@ class Projects::CompareController < Projects::ApplicationController
end
 
def merge_request
@merge_request ||= MergeRequestsFinder.new(current_user, project_id: @project.id).execute.opened.
find_by(source_project: @project, source_branch: @head_ref, target_branch: @start_ref)
@merge_request ||= MergeRequestsFinder.new(current_user, project_id: @project.id).execute.opened
.find_by(source_project: @project, source_branch: @head_ref, target_branch: @start_ref)
end
end
Loading
Loading
@@ -9,18 +9,18 @@ class Projects::EnvironmentsController < Projects::ApplicationController
before_action :verify_api_request!, only: :terminal_websocket_authorize
 
def index
@environments = project.environments.
with_state(params[:scope] || :available)
@environments = project.environments
.with_state(params[:scope] || :available)
 
respond_to do |format|
format.html
format.json do
render json: {
environments: EnvironmentSerializer.
new(project: @project, user: @current_user).
with_pagination(request, response).
within_folders.
represent(@environments),
environments: EnvironmentSerializer
.new(project: @project, user: @current_user)
.with_pagination(request, response)
.within_folders
.represent(@environments),
available_count: project.environments.available.count,
stopped_count: project.environments.stopped.count
}
Loading
Loading
@@ -36,10 +36,10 @@ class Projects::EnvironmentsController < Projects::ApplicationController
format.html
format.json do
render json: {
environments: EnvironmentSerializer.
new(project: @project, user: @current_user).
with_pagination(request, response).
represent(@environments),
environments: EnvironmentSerializer
.new(project: @project, user: @current_user)
.with_pagination(request, response)
.represent(@environments),
available_count: folder_environments.available.count,
stopped_count: folder_environments.stopped.count
}
Loading
Loading
Loading
Loading
@@ -77,8 +77,8 @@ class Projects::IssuesController < Projects::ApplicationController
def show
raw_notes = @issue.notes.inc_relations_for_view.fresh
 
@notes = Banzai::NoteRenderer.
render(raw_notes, @project, current_user, @path, @project_wiki, @ref)
@notes = Banzai::NoteRenderer
.render(raw_notes, @project, current_user, @path, @project_wiki, @ref)
 
@note = @project.notes.new(noteable: @issue)
@noteable = @issue
Loading
Loading
@@ -189,9 +189,9 @@ class Projects::IssuesController < Projects::ApplicationController
def merge_request_for_resolving_discussions
return unless merge_request_iid = params[:merge_request_for_resolving_discussions]
 
@merge_request_for_resolving_discussions ||= MergeRequestsFinder.new(current_user, project_id: project.id).
execute.
find_by(iid: merge_request_iid)
@merge_request_for_resolving_discussions ||= MergeRequestsFinder.new(current_user, project_id: project.id)
.execute
.find_by(iid: merge_request_iid)
end
 
def authorize_read_issue!
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment