Skip to content
Snippets Groups Projects
Commit 3db37e05 authored by Rémy Coutable's avatar Rémy Coutable
Browse files

Enable the Style/TrailingCommaInArguments cop


Use the EnforcedStyleForMultiline: no_comma option.

Signed-off-by: default avatarRémy Coutable <remy@rymai.me>
parent d40e1f54
No related branches found
No related tags found
No related merge requests found
Showing
with 25 additions and 27 deletions
Loading
Loading
@@ -497,6 +497,11 @@ Style/TrailingCommaInLiteral:
Enabled: true
EnforcedStyleForMultiline: no_comma
 
# This cop checks for trailing comma in argument lists.
Style/TrailingCommaInArguments:
Enabled: true
EnforcedStyleForMultiline: no_comma
# Checks for %W when interpolation is not needed.
Style/UnneededCapitalW:
Enabled: true
Loading
Loading
Loading
Loading
@@ -369,13 +369,6 @@ Style/SymbolProc:
Style/TernaryParentheses:
Enabled: false
 
# Offense count: 53
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyleForMultiline, SupportedStylesForMultiline.
# SupportedStylesForMultiline: comma, consistent_comma, no_comma
Style/TrailingCommaInArguments:
Enabled: false
# Offense count: 18
# Cop supports --auto-correct.
# Configuration parameters: AllowNamedUnderscoreVariables.
Loading
Loading
Loading
Loading
@@ -33,7 +33,7 @@ class Profiles::PreferencesController < Profiles::ApplicationController
:color_scheme_id,
:layout,
:dashboard,
:project_view,
:project_view
)
end
end
Loading
Loading
@@ -269,7 +269,7 @@ class Projects::IssuesController < Projects::ApplicationController
def issue_params
params.require(:issue).permit(
:title, :assignee_id, :position, :description, :confidential,
:milestone_id, :due_date, :state_event, :task_num, :lock_version, label_ids: [], assignee_ids: [],
:milestone_id, :due_date, :state_event, :task_num, :lock_version, label_ids: [], assignee_ids: []
)
end
 
Loading
Loading
Loading
Loading
@@ -39,7 +39,7 @@ class DiffDiscussion < Discussion
def reply_attributes
super.merge(
original_position: original_position.to_json,
position: position.to_json,
position: position.to_json
)
end
end
Loading
Loading
@@ -74,7 +74,7 @@ class Key < ActiveRecord::Base
GitlabShellWorker.perform_async(
:remove_key,
shell_id,
key,
key
)
end
 
Loading
Loading
Loading
Loading
@@ -56,7 +56,7 @@ class Namespace < ActiveRecord::Base
'COALESCE(SUM(ps.storage_size), 0) AS storage_size',
'COALESCE(SUM(ps.repository_size), 0) AS repository_size',
'COALESCE(SUM(ps.lfs_objects_size), 0) AS lfs_objects_size',
'COALESCE(SUM(ps.build_artifacts_size), 0) AS build_artifacts_size',
'COALESCE(SUM(ps.build_artifacts_size), 0) AS build_artifacts_size'
)
end
 
Loading
Loading
Loading
Loading
@@ -37,7 +37,7 @@ class FlowdockService < Service
repo: project.repository.path_to_repo,
repo_url: "#{Gitlab.config.gitlab.url}/#{project.path_with_namespace}",
commit_url: "#{Gitlab.config.gitlab.url}/#{project.path_with_namespace}/commit/%s",
diff_url: "#{Gitlab.config.gitlab.url}/#{project.path_with_namespace}/compare/%s...%s",
diff_url: "#{Gitlab.config.gitlab.url}/#{project.path_with_namespace}/compare/%s...%s"
)
end
end
Loading
Loading
@@ -833,7 +833,7 @@ class Repository
 
actual_options = options.merge(
parents: [our_commit, their_commit],
tree: merge_index.write_tree(rugged),
tree: merge_index.write_tree(rugged)
)
 
commit_id = create_commit(actual_options)
Loading
Loading
Loading
Loading
@@ -39,7 +39,7 @@ class SentNotification < ActiveRecord::Base
 
noteable_type: noteable.class.name,
noteable_id: noteable_id,
commit_id: commit_id,
commit_id: commit_id
)
 
create(attrs)
Loading
Loading
Loading
Loading
@@ -38,7 +38,7 @@ module Boards
attrs.merge!(
add_label_ids: add_label_ids,
remove_label_ids: remove_label_ids,
state_event: issue_state,
state_event: issue_state
)
end
 
Loading
Loading
Loading
Loading
@@ -298,7 +298,7 @@ class NotificationService
recipients ||= NotificationRecipientService.new(pipeline.project).build_pipeline_recipients(
pipeline,
pipeline.user,
action: pipeline.status,
action: pipeline.status
).map(&:notification_email)
 
if recipients.any?
Loading
Loading
Loading
Loading
@@ -51,7 +51,7 @@ class SystemHooksService
path: model.path,
group_id: model.id,
owner_name: owner.respond_to?(:name) ? owner.name : nil,
owner_email: owner.respond_to?(:email) ? owner.email : nil,
owner_email: owner.respond_to?(:email) ? owner.email : nil
)
when GroupMember
data.merge!(group_member_data(model))
Loading
Loading
Loading
Loading
@@ -8,7 +8,7 @@ module RepositoryCheck
Project.select(:id).find_in_batches(batch_size: 100) do |batch|
Project.where(id: batch.map(&:id)).update_all(
last_repository_check_failed: nil,
last_repository_check_at: nil,
last_repository_check_at: nil
)
end
end
Loading
Loading
Loading
Loading
@@ -7,7 +7,7 @@ module RepositoryCheck
project = Project.find(project_id)
project.update_columns(
last_repository_check_failed: !check(project),
last_repository_check_at: Time.now,
last_repository_check_at: Time.now
)
end
 
Loading
Loading
Loading
Loading
@@ -33,7 +33,7 @@ module ActiveRecord
 
affected_rows = relation.where(
self.class.primary_key => id,
lock_col => previous_lock_value,
lock_col => previous_lock_value
).update_all(
attributes_for_update(attribute_names).map do |name|
[name, _read_attribute(name)]
Loading
Loading
Loading
Loading
@@ -3,7 +3,7 @@ module Hamlit
def call(template)
Engine.new(
generator: Temple::Generators::RailsOutputBuffer,
attr_quote: '"',
attr_quote: '"'
).call(template.source)
end
end
Loading
Loading
@@ -11,7 +11,7 @@ end
 
ActionView::Template.register_template_handler(
:haml,
Hamlit::TemplateHandler.new,
Hamlit::TemplateHandler.new
)
 
Hamlit::Filters.remove_filter('coffee')
Loading
Loading
Loading
Loading
@@ -30,14 +30,14 @@ if app.config.serve_static_files
settings.merge!(
host: Gitlab.config.gitlab.host,
port: Gitlab.config.gitlab.port,
https: Gitlab.config.gitlab.https,
https: Gitlab.config.gitlab.https
)
app.config.middleware.insert_before(
Gitlab::Middleware::Static,
Gitlab::Middleware::WebpackProxy,
proxy_path: app.config.webpack.public_path,
proxy_host: dev_server.host,
proxy_port: dev_server.port,
proxy_port: dev_server.port
)
end
 
Loading
Loading
Loading
Loading
@@ -101,7 +101,7 @@ class Spinach::Features::ExploreProjects < Spinach::FeatureSteps
create(:merge_request,
title: "Bug fix for public project",
source_project: public_project,
target_project: public_project,
target_project: public_project
)
end
 
Loading
Loading
Loading
Loading
@@ -24,7 +24,7 @@ module API
def present_groups(groups, options = {})
options = options.reverse_merge(
with: Entities::Group,
current_user: current_user,
current_user: current_user
)
 
groups = groups.with_statistics if options[:statistics]
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